diff options
author | Necrodoom <doomed.war@gmail.com> | 2013-05-12 15:22:35 +0300 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-06-09 03:07:35 +0100 |
commit | a13b708d561d4442f0e61bec9e1e950e5c15383f (patch) | |
tree | b0ae8376ad8d8d27e2c7a35506445816d9d47b47 | |
parent | a6b5902929836f2adc1f47ab2ea5f156327c5874 (diff) | |
download | Essentials-a13b708d561d4442f0e61bec9e1e950e5c15383f.tar Essentials-a13b708d561d4442f0e61bec9e1e950e5c15383f.tar.gz Essentials-a13b708d561d4442f0e61bec9e1e950e5c15383f.tar.lz Essentials-a13b708d561d4442f0e61bec9e1e950e5c15383f.tar.xz Essentials-a13b708d561d4442f0e61bec9e1e950e5c15383f.zip |
Fix arg length checks on /exp
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandexp.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandexp.java b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java index c2a1dc9ff..ba84b6cf4 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandexp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandexp.java @@ -26,7 +26,7 @@ public class Commandexp extends EssentialsCommand {
showExp(user, user);
}
- else if (args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set"))
+ else if (args.length > 1 && args[0].equalsIgnoreCase("set") && user.isAuthorized("essentials.exp.set"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.set.others"))
{
@@ -37,7 +37,7 @@ public class Commandexp extends EssentialsCommand setExp(user, user, args[1], false);
}
}
- else if (args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give"))
+ else if (args.length > 1 && args[0].equalsIgnoreCase("give") && user.isAuthorized("essentials.exp.give"))
{
if (args.length == 3 && user.isAuthorized("essentials.exp.give.others"))
{
|