diff --git a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java index a91968acf..a4dbd6b03 100755 --- a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java +++ b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java @@ -46,23 +46,6 @@ public class TreasureConfig extends ConfigLoader { protected boolean validateKeys() { // Validate all the settings! List reason = new ArrayList<>(); - for (String tier : config.getConfigurationSection("Enchantment_Drop_Rates").getKeys(false)) { - double totalItemDropRate = 0; - - for (Rarity rarity : Rarity.values()) { - double itemDropRate = config.getDouble("Item_Drop_Rates." + tier + "." + rarity.toString()); - - if (itemDropRate < 0.0 || itemDropRate > 100.0) { - reason.add("The item drop rate for " + tier + " items that are " + rarity.toString() + "should be between 0.0 and 100.0!"); - } - - totalItemDropRate += itemDropRate; - } - - if (totalItemDropRate < 0 || totalItemDropRate > 100.0) { - reason.add("The total item drop rate for " + tier + " should be between 0.0 and 100.0!"); - } - } return noErrorsInConfig(reason); } @@ -74,7 +57,6 @@ public class TreasureConfig extends ConfigLoader { return; } - loadTreasures("Fishing"); loadTreasures("Excavation"); loadTreasures("Hylian_Luck"); @@ -253,22 +235,6 @@ public class TreasureConfig extends ConfigLoader { hylianMap.get(dropper).add(treasure); } - public boolean getInventoryStealEnabled() { - return config.contains("Shake.PLAYER.INVENTORY"); - } - - public boolean getInventoryStealStacks() { - return config.getBoolean("Shake.PLAYER.INVENTORY.Whole_Stacks"); - } - - public double getInventoryStealDropChance() { - return config.getDouble("Shake.PLAYER.INVENTORY.Drop_Chance"); - } - - public int getInventoryStealDropLevel() { - return config.getInt("Shake.PLAYER.INVENTORY.Drop_Level"); - } - public double getItemDropRate(int tier, Rarity rarity) { return config.getDouble("Item_Drop_Rates.Tier_" + tier + "." + rarity.toString()); } diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 59789c29d..f2bba2bd5 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -531,7 +531,7 @@ public class FishingManager extends SkillManager { break; case BEDROCK: - if (TreasureConfig.getInstance().getInventoryStealEnabled()) { + if (FishingTreasureConfig.getInstance().getInventoryStealEnabled()) { PlayerInventory inventory = targetPlayer.getInventory(); int length = inventory.getContents().length; int slot = Misc.getRandom().nextInt(length); @@ -541,7 +541,7 @@ public class FishingManager extends SkillManager { break; } - if (TreasureConfig.getInstance().getInventoryStealStacks()) { + if (FishingTreasureConfig.getInstance().getInventoryStealStacks()) { inventory.setItem(slot, null); } else {