From e9b151111777abb429a62a9590e6e09e358a28dd Mon Sep 17 00:00:00 2001 From: md678685 Date: Fri, 12 Oct 2018 17:26:41 +0100 Subject: [PATCH] Remove item ID support in Worth --- .../src/com/earth2me/essentials/Worth.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Worth.java b/Essentials/src/com/earth2me/essentials/Worth.java index ef3c4c034..12779f785 100644 --- a/Essentials/src/com/earth2me/essentials/Worth.java +++ b/Essentials/src/com/earth2me/essentials/Worth.java @@ -23,17 +23,10 @@ public class Worth implements IConf { public BigDecimal getPrice(IEssentials essentials, ItemStack itemStack) { BigDecimal result; - int itemId; - - try { - itemId = essentials.getItemDb().getLegacyId(itemStack.getType()); - } catch (Exception e) { - return null; - } String itemname = itemStack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""); - //First check for matches with item name + // Check for matches with item name result = config.getBigDecimal("worth." + itemname + "." + itemStack.getDurability(), BigDecimal.ONE.negate()); if (result.signum() < 0) { final ConfigurationSection itemNameMatch = config.getConfigurationSection("worth." + itemname); @@ -48,27 +41,6 @@ public class Worth implements IConf { result = config.getBigDecimal("worth." + itemname, BigDecimal.ONE.negate()); } - //Now we should check for item ID - if (result.signum() < 0) { - result = config.getBigDecimal("worth." + itemId + "." + itemStack.getDurability(), BigDecimal.ONE.negate()); - } - if (result.signum() < 0) { - final ConfigurationSection itemNumberMatch = config.getConfigurationSection("worth." + itemId); - if (itemNumberMatch != null && itemNumberMatch.getKeys(false).size() == 1) { - result = config.getBigDecimal("worth." + itemId + ".0", BigDecimal.ONE.negate()); - } - } - if (result.signum() < 0) { - result = config.getBigDecimal("worth." + itemId + ".*", BigDecimal.ONE.negate()); - } - if (result.signum() < 0) { - result = config.getBigDecimal("worth." + itemId, BigDecimal.ONE.negate()); - } - - //This is to match the old worth syntax - if (result.signum() < 0) { - result = config.getBigDecimal("worth-" + itemId, BigDecimal.ONE.negate()); - } if (result.signum() < 0) { return null; }