Check if the user wants this item repairable first

Stop complaining that the item is not repairable when Repairable is set
to false.
This commit is contained in:
TfT_02 2014-07-31 00:46:41 +02:00
parent 75cbfa1b1c
commit 18c322e8d6
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}