diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-09 07:06:45 -0700 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-09 07:06:45 -0700 |
commit | 8389a59d5492551bd1f98e49b97b6a1011a79a1f (patch) | |
tree | 4fba65fe4fdcba7db8b4520523dbf6e2c68d0824 | |
parent | 010245e1a5b357550fd5271b0b955c7f1143e46a (diff) | |
parent | 7668af15b03bdf64ec985320d5b4a0126a200390 (diff) | |
download | Essentials-8389a59d5492551bd1f98e49b97b6a1011a79a1f.tar Essentials-8389a59d5492551bd1f98e49b97b6a1011a79a1f.tar.gz Essentials-8389a59d5492551bd1f98e49b97b6a1011a79a1f.tar.lz Essentials-8389a59d5492551bd1f98e49b97b6a1011a79a1f.tar.xz Essentials-8389a59d5492551bd1f98e49b97b6a1011a79a1f.zip |
Merge pull request #27 from feildmaster/patch-1
Fires an event before "killing."
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkill.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java index 03afeadc4..0b403ca7d 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java @@ -23,6 +23,10 @@ public class Commandkill extends EssentialsCommand for (Player p : server.matchPlayer(args[0])) { + EntityDamageEvent ede = new EntityDamageEvent(p, EntityDamageEvent.DamageCause.CUSTOM, 1000); + server.getPluginManager().callEvent(ede); + //if (ede.isCancelled()) return; + p.setHealth(0); sender.sendMessage(Util.format("kill", p.getDisplayName())); } |