Class AttributeCompat
java.lang.Object
io.github.sefiraat.slimetinker.utils.AttributeCompat
Version-safe access to an entity's maximum health.
Modern servers expose this via
getAttribute(Attribute.GENERIC_MAX_HEALTH)
(the org.bukkit.attribute package arrived in 1.9). On 1.8 that package is
absent, so we fall back to the long-standing deprecated getMaxHealth().
All access is reflective to keep the Attribute class off the load path.-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetMaxHealth(org.bukkit.entity.LivingEntity entity)
-
Method Details
-
getMaxHealth
public static double getMaxHealth(@Nonnull org.bukkit.entity.LivingEntity entity)
-