summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 09:00:29 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-09 09:00:29 +0000
commitd7ec819ad8a064b085de89fad82a2c6b2c7b0994 (patch)
tree57cc46defbb3f3b8d77bdd81545c08ef21a0aebf
parent185d57428850f7dc8c96f7044a34ae6912fe54df (diff)
downloadEssentials-d7ec819ad8a064b085de89fad82a2c6b2c7b0994.tar
Essentials-d7ec819ad8a064b085de89fad82a2c6b2c7b0994.tar.gz
Essentials-d7ec819ad8a064b085de89fad82a2c6b2c7b0994.tar.lz
Essentials-d7ec819ad8a064b085de89fad82a2c6b2c7b0994.tar.xz
Essentials-d7ec819ad8a064b085de89fad82a2c6b2c7b0994.zip
Minor fix on give and item
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1390 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandgive.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commanditem.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
index 7dd3a488e..bfaae0a0b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java
@@ -30,11 +30,11 @@ public class Commandgive extends EssentialsCommand
String itemname = stack.getType().toString().toLowerCase().replace("_", "");
if (sender instanceof Player
&& (ess.getSettings().permissionBasedItemSpawn()
- ? !ess.getUser(sender).isAuthorized("essentials.give.item-all")
- && !ess.getUser(sender).isAuthorized("essentials.give.item-" + itemname)
- && !ess.getUser(sender).isAuthorized("essentials.give.item-" + stack.getTypeId())
- : !ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt")
- && !ess.getUser(sender).canSpawnItem(stack.getTypeId())))
+ ? (!ess.getUser(sender).isAuthorized("essentials.give.item-all")
+ && !ess.getUser(sender).isAuthorized("essentials.give.item-" + itemname)
+ && !ess.getUser(sender).isAuthorized("essentials.give.item-" + stack.getTypeId()))
+ : (!ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt")
+ && !ess.getUser(sender).canSpawnItem(stack.getTypeId()))))
{
sender.sendMessage(ChatColor.RED + "You are not allowed to spawn the item " + itemname);
return;
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
index 119d0cc6b..6750fbfaf 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java
@@ -26,11 +26,11 @@ public class Commanditem extends EssentialsCommand
String itemname = stack.getType().toString().toLowerCase().replace("_", "");
if (ess.getSettings().permissionBasedItemSpawn()
- ? !user.isAuthorized("essentials.itemspawn.item-all")
- && !user.isAuthorized("essentials.itemspawn.item-" + itemname)
- && !user.isAuthorized("essentials.itemspawn.item-" + stack.getTypeId())
- : !user.isAuthorized("essentials.itemspawn.exempt")
- && !user.canSpawnItem(stack.getTypeId()))
+ ? (!user.isAuthorized("essentials.itemspawn.item-all")
+ && !user.isAuthorized("essentials.itemspawn.item-" + itemname)
+ && !user.isAuthorized("essentials.itemspawn.item-" + stack.getTypeId()))
+ : (!user.isAuthorized("essentials.itemspawn.exempt")
+ && !user.canSpawnItem(stack.getTypeId())))
{
user.sendMessage(ChatColor.RED + "You are not allowed to spawn the item " + itemname);
return;