mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-20 21:41:32 +02:00
Fix /sell to handle zero priced items again.
This commit is contained in:
@@ -24,19 +24,19 @@ public class Worth implements IConf
|
|||||||
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
|
String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", "");
|
||||||
BigDecimal result;
|
BigDecimal result;
|
||||||
result = config.getBigDecimal("worth." + itemname + "." + itemStack.getDurability(), BigDecimal.ONE.negate());
|
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());
|
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());
|
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());
|
result = config.getBigDecimal("worth-" + itemStack.getTypeId(), BigDecimal.ONE.negate());
|
||||||
}
|
}
|
||||||
if (result.signum() <= 0)
|
if (result.signum() < 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user