浏览代码

Check if the user wants this item repairable first

Stop complaining that the item is not repairable when Repairable is set
to false.
TfT_02 11 年之前
父节点
当前提交
18c322e8d6

+ 1 - 1
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;
             }

+ 1 - 1
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;
             }