From 1e66cd27c354c0ec41b5b9183d27e93272fe7062 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 12 Jun 2023 08:17:09 +1000 Subject: [PATCH] SPIGOT-7383: Add EntityDamageEvent.DamageCause#KILL and EntityDamageEvent.DamageCause#WORLD_BORDER By: Doc --- .../java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 690e662f75..a59a335321 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -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; }