mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
Fix /sell to handle zero priced items again.
This commit is contained in:
parent
76a96d1004
commit
9ec1a6b78f
@ -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 New Issue
Block a user