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
commite24b321ebafa4dc1ed1ab588f7655fb24005244e (patch)
treea8b9d4b9af5157c3cb086c7b1402d10080012924
parent27311f669b9b729f0705003ca5fd2b77a58f1cb8 (diff)
downloadEssentials-e24b321ebafa4dc1ed1ab588f7655fb24005244e.tar
Essentials-e24b321ebafa4dc1ed1ab588f7655fb24005244e.tar.gz
Essentials-e24b321ebafa4dc1ed1ab588f7655fb24005244e.tar.lz
Essentials-e24b321ebafa4dc1ed1ab588f7655fb24005244e.tar.xz
Essentials-e24b321ebafa4dc1ed1ab588f7655fb24005244e.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;