mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
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:
parent
75cbfa1b1c
commit
18c322e8d6
@ -72,7 +72,7 @@ public class CustomArmorConfig extends ConfigLoader {
|
|||||||
boolean repairable = config.getBoolean(armorType + "." + armorName + ".Repairable");
|
boolean repairable = config.getBoolean(armorType + "." + armorName + ".Repairable");
|
||||||
Material repairMaterial = Material.matchMaterial(config.getString(armorType + "." + armorName + ".Repair_Material", ""));
|
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);
|
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + armorName);
|
||||||
repairable = false;
|
repairable = false;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class CustomToolConfig extends ConfigLoader {
|
|||||||
boolean repairable = config.getBoolean(toolType + "." + toolName + ".Repairable");
|
boolean repairable = config.getBoolean(toolType + "." + toolName + ".Repairable");
|
||||||
Material repairMaterial = Material.matchMaterial(config.getString(toolType + "." + toolName + ".Repair_Material", ""));
|
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);
|
plugin.getLogger().warning("Incomplete repair information. This item will be unrepairable. - " + toolName);
|
||||||
repairable = false;
|
repairable = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user