From a92eb4dee6936a502a003533f6909231d0df4ffa Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 10 Aug 2012 02:40:05 +0100 Subject: [PATCH] Throw warning when using /kill without valid player. --- .../src/com/earth2me/essentials/commands/Commandkill.java | 6 ++++++ .../src/com/earth2me/essentials/commands/Commandpay.java | 1 + 2 files changed, 7 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java index 77994f156..a7fdd338f 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java @@ -21,6 +21,12 @@ public class Commandkill extends EssentialsCommand { throw new NotEnoughArgumentsException(); } + + //TODO: TL this + if (args[0].trim().length() < 3) + { + throw new NotEnoughArgumentsException("You need to specify a player to kill."); + } for (Player matchPlayer : server.matchPlayer(args[0])) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java index fde9be58a..af7519f56 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandpay.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandpay.java @@ -22,6 +22,7 @@ public class Commandpay extends EssentialsCommand throw new NotEnoughArgumentsException(); } + //TODO: TL this if (args[0].trim().length() < 3) { throw new NotEnoughArgumentsException("You need to specify a player to pay.");