mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Reduce restrictions on same item trading, so only identical items are blocked.
This commit is contained in:
parent
a67520477b
commit
7648e38ec2
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue