mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
Reduce restrictions on same item trading, so only identical items are blocked.
This commit is contained in:
parent
a67520477b
commit
7648e38ec2
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user