diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandkill.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandkill.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java new file mode 100644 index 000000000..ef5315c85 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java @@ -0,0 +1,33 @@ +package com.earth2me.essentials.commands; + +import org.bukkit.Server; +import org.bukkit.command.CommandSender; +import com.earth2me.essentials.Essentials; +import org.bukkit.entity.Player; +import com.earth2me.essentials.User; + + +public class Commandkill extends EssentialsCommand +{ + public Commandkill() + { + super("kill"); + } + + @Override + public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception + { + if (args.length < 1) + { + sender.sendMessage("§cUsage: /kill [player]"); + return; + } + + User.charge(sender, this); + for (Player p : server.matchPlayer(args[0])) + { + p.setHealth(0); + sender.sendMessage("§cKilled " + p.getDisplayName() + "."); + } + } +} |