diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java index 1ed554b3e..77c074c81 100644 --- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java +++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java @@ -164,7 +164,6 @@ public class MetaItemStack { List pages = pager.getPages(split[1]); meta.setPages(pages); - stack.setItemMeta(meta); } else @@ -397,8 +396,6 @@ public class MetaItemStack stack.setItemMeta(pmeta); resetPotionMeta(); } - - } } @@ -479,6 +476,7 @@ public class MetaItemStack { return null; } + final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH); if (user != null && !user.isAuthorized("essentials.enchant." + enchantmentName)) { @@ -490,12 +488,7 @@ public class MetaItemStack private boolean hasMetaPermission(final CommandSender sender, final String metaPerm, final boolean graceful, final IEssentials ess) throws Exception { final User user = ess.getUser(sender); - if (user == null) - { - return true; - } - - if (user.isAuthorized("essentials.itemspawn.meta-" + metaPerm)) + if (user == null || user.isAuthorized("essentials.itemspawn.meta-" + metaPerm)) { return true; } diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java index cfca60d89..d1115eaae 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.signs; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.*; +import com.earth2me.essentials.Trade.TradeType; import org.bukkit.inventory.ItemStack; //TODO: TL exceptions @@ -20,7 +21,7 @@ public class SignTrade extends EssentialsSign validateTrade(sign, 2, true, ess); final Trade trade = getTrade(sign, 2, true, true, ess); final Trade charge = getTrade(sign, 1, true, false, ess); - if (trade.getType() == charge.getType()) { + if (trade.getType() == charge.getType() && (trade.getType() != TradeType.ITEM || trade.getItemStack().getType().equals(charge.getItemStack().getType()))) { throw new SignException("You cannot trade for the same item type."); } trade.isAffordableFor(player);