summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandexp.java4
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"))
{