mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-21 05:51:56 +02:00
Fix for a bug in getTrade() of Signs that would return the quantity of items as money.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user