diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-05-05 19:59:35 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-05-05 19:59:35 +0100 |
commit | 9ec1a6b78f355fc222d09fea2eb0d6220266b187 (patch) | |
tree | 78bb74fd8fd61375db482314da7cc9998f84df98 | |
parent | 76a96d1004404d625b98ceffabe73a5f1201b59d (diff) | |
download | Essentials-9ec1a6b78f355fc222d09fea2eb0d6220266b187.tar Essentials-9ec1a6b78f355fc222d09fea2eb0d6220266b187.tar.gz Essentials-9ec1a6b78f355fc222d09fea2eb0d6220266b187.tar.lz Essentials-9ec1a6b78f355fc222d09fea2eb0d6220266b187.tar.xz Essentials-9ec1a6b78f355fc222d09fea2eb0d6220266b187.zip |
Fix /sell to handle zero priced items again.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Worth.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Worth.java b/Essentials/src/com/earth2me/essentials/Worth.java index 8cc65e24c..ac5dbfe9a 100644 --- a/Essentials/src/com/earth2me/essentials/Worth.java +++ b/Essentials/src/com/earth2me/essentials/Worth.java @@ -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; } |