SPIGOT-7383: Add EntityDamageEvent.DamageCause#KILL and EntityDamageEvent.DamageCause#WORLD_BORDER

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot 2023-06-12 08:17:09 +10:00
parent 4c192dd4e7
commit 1e66cd27c3

View File

@ -1027,6 +1027,10 @@ public class CraftEventFactory {
cause = DamageCause.DRYOUT;
} else if (source.is(DamageTypes.FREEZE)) {
cause = DamageCause.FREEZE;
} else if (source.is(DamageTypes.GENERIC_KILL)) {
cause = DamageCause.KILL;
} else if (source.is(DamageTypes.OUTSIDE_BORDER)) {
cause = DamageCause.WORLD_BORDER;
} else {
cause = DamageCause.CUSTOM;
}