diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/KillCommand.java | 1 | ||||
-rw-r--r-- | src/main/java/org/bukkit/event/entity/EntityDamageEvent.java | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/KillCommand.java b/src/main/java/org/bukkit/command/defaults/KillCommand.java index e9d6f2a7..0deff08c 100644 --- a/src/main/java/org/bukkit/command/defaults/KillCommand.java +++ b/src/main/java/org/bukkit/command/defaults/KillCommand.java @@ -24,6 +24,7 @@ public class KillCommand extends VanillaCommand { Bukkit.getPluginManager().callEvent(ede); if (ede.isCancelled()) return true; + ede.getEntity().setLastDamageCause(ede); player.damage(ede.getDamage()); } else { sender.sendMessage("You can only perform this command as a player"); diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index 2fa2c465..f059b407 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -1,6 +1,5 @@ package org.bukkit.event.entity; -import org.bukkit.entity.ComplexEntityPart; import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; @@ -18,12 +17,6 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { super(damagee); this.cause = cause; this.damage = damage; - - if (damagee instanceof ComplexEntityPart) { - ((ComplexEntityPart) damagee).getParent().setLastDamageCause(this); - } else { - damagee.setLastDamageCause(this); - } } public boolean isCancelled() { |