mirror of
https://github.com/essentials/Essentials.git
synced 2025-01-17 21:39:26 +01:00
Merge pull request #27 from feildmaster/patch-1
Fires an event before "killing."
This commit is contained in:
commit
63e6bf8ff3
@ -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()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user