1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 19:44:15 +02:00

Fully support numerical worth yml data.

This commit is contained in:
KHobbits
2013-08-11 23:43:45 +01:00
parent 517d6a30cb
commit 85402be22b

View File

@@ -36,6 +36,18 @@ public class Worth implements IConf
result = config.getBigDecimal("worth." + itemname, BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId() + "." + itemStack.getDurability(), BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId() + ".0", BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth." + itemStack.getTypeId(), BigDecimal.ONE.negate());
}
if (result.signum() < 0)
{
result = config.getBigDecimal("worth-" + itemStack.getTypeId(), BigDecimal.ONE.negate());
}