mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
If the player is still alive, make sure he dies. (/kill)
This commit is contained in:
parent
8ba7a24fd2
commit
600f99eb6b
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,7 @@ public class Commandkill extends EssentialsCommand
|
||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: TL this
|
//TODO: TL this
|
||||||
if (args[0].trim().length() < 2)
|
if (args[0].trim().length() < 2)
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,12 @@ public class Commandkill extends EssentialsCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
matchPlayer.damage(Short.MAX_VALUE);
|
matchPlayer.damage(Short.MAX_VALUE);
|
||||||
|
|
||||||
|
if (matchPlayer.getHealth() > 0)
|
||||||
|
{
|
||||||
|
matchPlayer.setHealth(0);
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage(_("kill", matchPlayer.getDisplayName()));
|
sender.sendMessage(_("kill", matchPlayer.getDisplayName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue