mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-10 13:49:11 +01:00
Made KillCommand set the player health to 0 to allow it to work in Creative. Fixes BUKKIT-2949
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
8cb39a7daf
commit
bf632e042c
@ -30,7 +30,7 @@ public class KillCommand extends VanillaCommand {
|
|||||||
if (ede.isCancelled()) return true;
|
if (ede.isCancelled()) return true;
|
||||||
|
|
||||||
ede.getEntity().setLastDamageCause(ede);
|
ede.getEntity().setLastDamageCause(ede);
|
||||||
player.damage(ede.getDamage());
|
player.setHealth(0);
|
||||||
sender.sendMessage("Ouch. That look like it hurt.");
|
sender.sendMessage("Ouch. That look like it hurt.");
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("You can only perform this command as a player");
|
sender.sendMessage("You can only perform this command as a player");
|
||||||
|
Loading…
Reference in New Issue
Block a user