From 18c322e8d6ebc2f60a1c0d3bcd4fb8394499f570 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Thu, 31 Jul 2014 00:46:41 +0200 Subject: [PATCH] Check if the user wants this item repairable first Stop complaining that the item is not repairable when Repairable is set to false. --- .../java/com/gmail/nossr50/config/mods/CustomArmorConfig.java | 2 +- .../java/com/gmail/nossr50/config/mods/CustomToolConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java index 743ee5d73..1b82f622f 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java @@ -72,7 +72,7 @@ public class CustomArmorConfig extends ConfigLoader { boolean repairable = config.getBoolean(armorType + "." + armorName + ".Repairable"); Material repairMaterial = Material.matchMaterial(config.getString(armorType + "." + armorName + ".Repair_Material", "")); - if (repairMaterial == null) { + if (repairable && (repairMaterial == null)) { plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + armorName); repairable = false; } diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomToolConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomToolConfig.java index 5f2a1e4b7..edbb7f09e 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomToolConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomToolConfig.java @@ -80,7 +80,7 @@ public class CustomToolConfig extends ConfigLoader { boolean repairable = config.getBoolean(toolType + "." + toolName + ".Repairable"); Material repairMaterial = Material.matchMaterial(config.getString(toolType + "." + toolName + ".Repair_Material", "")); - if (repairMaterial == null) { + if (repairable && (repairMaterial == null)) { plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + toolName); repairable = false; }