From 1630d4344bcbbe6c435fac30ceba789c6c1acb2a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 9 Dec 2016 12:30:49 +1100 Subject: [PATCH] SPIGOT-2902: Deprecate Damageable methods in favour of Attributes. By: md_5 --- paper-api/src/main/java/org/bukkit/entity/Damageable.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Damageable.java b/paper-api/src/main/java/org/bukkit/entity/Damageable.java index d0599cf0a6..bd601bb60b 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Damageable.java +++ b/paper-api/src/main/java/org/bukkit/entity/Damageable.java @@ -1,5 +1,7 @@ package org.bukkit.entity; +import org.bukkit.attribute.Attribute; + /** * Represents an {@link Entity} that has health and can take damage. */ @@ -84,7 +86,9 @@ public interface Damageable extends Entity { * Gets the maximum health this entity has. * * @return Maximum health + * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}. */ + @Deprecated double getMaxHealth(); /** @@ -107,7 +111,9 @@ public interface Damageable extends Entity { * {@link Wither}, etc...} will have their bar scaled accordingly. * * @param health amount of health to set the maximum to + * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}. */ + @Deprecated void setMaxHealth(double health); /** @@ -122,6 +128,8 @@ public interface Damageable extends Entity { /** * Resets the max health to the original amount. + * @deprecated use {@link Attribute#GENERIC_MAX_HEALTH}. */ + @Deprecated void resetMaxHealth(); }