mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-27 00:49:44 +00:00
Fix /sell to handle zero priced items again.
This commit is contained in:
parent
76a96d1004
commit
9ec1a6b78f
1 changed files with 4 additions and 4 deletions
|
@ -24,19 +24,19 @@ public class Worth implements IConf
|
|||
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
|
||||
BigDecimal result;
|
||||
result = config.getBigDecimal("worth." + itemname + "." + itemStack.getDurability(), BigDecimal.ONE.negate());
|
||||
if (result.signum() <= 0)
|
||||
if (result.signum() < 0)
|
||||
{
|
||||
result = config.getBigDecimal("worth." + itemname + ".0", BigDecimal.ONE.negate());
|
||||
}
|
||||
if (result.signum() <= 0)
|
||||
if (result.signum() < 0)
|
||||
{
|
||||
result = config.getBigDecimal("worth." + itemname, BigDecimal.ONE.negate());
|
||||
}
|
||||
if (result.signum() <= 0)
|
||||
if (result.signum() < 0)
|
||||
{
|
||||
result = config.getBigDecimal("worth-" + itemStack.getTypeId(), BigDecimal.ONE.negate());
|
||||
}
|
||||
if (result.signum() <= 0)
|
||||
if (result.signum() < 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue