mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Fix for a bug in getTrade() of Signs that would return the quantity of items as money.
This commit is contained in:
parent
6c9a57d4b3
commit
d95d7745ad
1 changed files with 2 additions and 5 deletions
|
@ -327,7 +327,7 @@ public class EssentialsSign
|
|||
|
||||
protected final Double getMoney(final String line) throws SignException
|
||||
{
|
||||
final boolean isMoney = line.matches("^[^0-9-\\.][\\.0-9]+");
|
||||
final boolean isMoney = line.matches("^[^0-9-\\.][\\.0-9]+$");
|
||||
return isMoney ? getDouble(line.substring(1)) : null;
|
||||
}
|
||||
|
||||
|
@ -381,15 +381,12 @@ public class EssentialsSign
|
|||
{
|
||||
final ItemStack stack = getItemStack(item, quantity);
|
||||
sign.setLine(index, quantity + " " + item);
|
||||
return new Trade(quantity, ess);
|
||||
return new Trade(stack, ess);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Trade(money, ess);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue