From 83529213d4c12034f6ca35e9889c28cb0785143f Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 11 Aug 2013 23:43:45 +0100 Subject: [PATCH] Fully support numerical worth yml data. --- Essentials/src/com/earth2me/essentials/Worth.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/Worth.java b/Essentials/src/com/earth2me/essentials/Worth.java index 336f663a9..1f9c9ec84 100644 --- a/Essentials/src/com/earth2me/essentials/Worth.java +++ b/Essentials/src/com/earth2me/essentials/Worth.java @@ -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()); }