summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-06-20 21:14:28 +0100
committerKHobbits <rob@khobbits.co.uk>2013-06-20 21:14:28 +0100
commit7648e38ec2aed3c698136fb1ffad80cdd48cc305 (patch)
tree6bf32a72ec78fcdf96b1b096d62bf00cd3d9b2f0
parenta67520477b1962dcece15a585aa4ad8eb4a8a73e (diff)
downloadEssentials-7648e38ec2aed3c698136fb1ffad80cdd48cc305.tar
Essentials-7648e38ec2aed3c698136fb1ffad80cdd48cc305.tar.gz
Essentials-7648e38ec2aed3c698136fb1ffad80cdd48cc305.tar.lz
Essentials-7648e38ec2aed3c698136fb1ffad80cdd48cc305.tar.xz
Essentials-7648e38ec2aed3c698136fb1ffad80cdd48cc305.zip
Reduce restrictions on same item trading, so only identical items are blocked.
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignTrade.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
index 37501f1aa..4029be5b7 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignTrade.java
@@ -32,7 +32,8 @@ public class SignTrade extends EssentialsSign
validateTrade(sign, 2, true, ess);
final Trade trade = getTrade(sign, 2, AmountType.ROUNDED, true, ess);
final Trade charge = getTrade(sign, 1, AmountType.ROUNDED, false, ess);
- if (trade.getType() == charge.getType() && (trade.getType() != TradeType.ITEM || trade.getItemStack().getType().equals(charge.getItemStack().getType())))
+ if (trade.getType() == charge.getType()
+ && (trade.getType() != TradeType.ITEM || trade.getItemStack().isSimilar(charge.getItemStack())))
{
throw new SignException("You cannot trade for the same item type.");
}