diff --git a/Spigot-API-Patches/Improve-death-events.patch b/Spigot-API-Patches/Improve-death-events.patch index d75e5fec81..6d97ab5c07 100644 --- a/Spigot-API-Patches/Improve-death-events.patch +++ b/Spigot-API-Patches/Improve-death-events.patch @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java -index ab9e81fd2..a7b8f869c 100644 +index ab9e81fd..fef134c6 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.ItemStack; @@ -74,7 +74,7 @@ index ab9e81fd2..a7b8f869c 100644 + */ + public void setReviveHealth(double reviveHealth) throws IllegalArgumentException { + double maxHealth = ((LivingEntity) entity).getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue(); -+ if ((reviveHealth <= 0) || (reviveHealth > maxHealth)) { ++ if ((maxHealth != 0 && reviveHealth <= 0) || (reviveHealth > maxHealth)) { + throw new IllegalArgumentException("Health must be between 0 (exclusive) and " + maxHealth + " (inclusive), but was " + reviveHealth); + } + this.reviveHealth = reviveHealth;