diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-27 00:23:40 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-27 00:23:40 +0100 |
commit | c70700f7b86771ad8d8a5f10c238e002e63db04e (patch) | |
tree | 8a6ab895d77f79ccc31212447b4af5b0515c34c0 | |
parent | b21b7b7e155a45227f9c629d51ee50ecbed1ca73 (diff) | |
download | Essentials-c70700f7b86771ad8d8a5f10c238e002e63db04e.tar Essentials-c70700f7b86771ad8d8a5f10c238e002e63db04e.tar.gz Essentials-c70700f7b86771ad8d8a5f10c238e002e63db04e.tar.lz Essentials-c70700f7b86771ad8d8a5f10c238e002e63db04e.tar.xz Essentials-c70700f7b86771ad8d8a5f10c238e002e63db04e.zip |
Fix banning random player (and all other commands where a empty player is given)
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java index 63717fcae..32d8ef979 100644 --- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java +++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java @@ -47,6 +47,10 @@ public abstract class EssentialsCommand implements IEssentialsCommand { throw new NotEnoughArgumentsException(); } + if (args[0].isEmpty()) + { + throw new NoSuchFieldException(_("playerNotFound")); + } final User user = ess.getUser(args[pos]); if (user != null) { |