3 char min length on /pay and /msg

This commit is contained in:
KHobbits 2012-06-13 00:49:36 +01:00
parent 1e04e3f80d
commit 2bebb0bd61
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ public class Commandmsg extends EssentialsCommand
@Override @Override
public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
{ {
if (args.length < 2 || args[0].trim().isEmpty() || args[1].trim().isEmpty()) if (args.length < 2 || args[0].trim().length() < 3 || args[1].trim().isEmpty())
{ {
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();
} }

View file

@ -22,7 +22,7 @@ public class Commandpay extends EssentialsCommand
throw new NotEnoughArgumentsException(); throw new NotEnoughArgumentsException();
} }
if (args[0] == "") if (args[0].trim().length() < 3)
{ {
throw new NotEnoughArgumentsException("You need to specify a player to pay."); throw new NotEnoughArgumentsException("You need to specify a player to pay.");
} }