From d7ec819ad8a064b085de89fad82a2c6b2c7b0994 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 9 May 2011 09:00:29 +0000 Subject: [PATCH] Minor fix on give and item git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1390 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../com/earth2me/essentials/commands/Commandgive.java | 10 +++++----- .../com/earth2me/essentials/commands/Commanditem.java | 10 +++++----- 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;