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 15afa4b3c..1d6c4952e 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java @@ -7,7 +7,6 @@ import java.util.List; import java.util.Set; import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.mods.CustomItem; @@ -91,14 +90,11 @@ public class CustomArmorConfig extends ModConfigLoader{ CustomItem armor; if (repairable) { - ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData); repairables.add(RepairableFactory.getRepairable(id, repairID, repairData, repairQuantity, durability)); - armor = new CustomItem(durability, repairMaterial, repairQuantity, repairable, id); - } - else { - armor = new CustomItem(durability, null, 0, repairable, id); } + armor = new CustomItem(id); + idList.add(id); customIDs.add(id); customArmorList.add(armor); diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java index d50c8c7d7..b57a66da9 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java @@ -7,7 +7,6 @@ import java.util.List; import java.util.Set; import org.bukkit.configuration.ConfigurationSection; -import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.mods.CustomTool; @@ -98,14 +97,11 @@ public class CustomToolsConfig extends ModConfigLoader { CustomTool tool; if (repairable) { - ItemStack repairMaterial = new ItemStack(repairID, 1, (short) 0, repairData); repairables.add(RepairableFactory.getRepairable(id, repairID, repairData, repairQuantity, durability)); - tool = new CustomTool(durability, repairMaterial, repairQuantity, repairable, tier, abilityEnabled, multiplier, id); - } - else { - tool = new CustomTool(durability, null, 0, repairable, tier, abilityEnabled, multiplier, id); } + tool = new CustomTool(tier, abilityEnabled, multiplier, id); + idList.add(id); customIDs.add(id); customToolList.add(tool); diff --git a/src/main/java/com/gmail/nossr50/datatypes/mods/CustomItem.java b/src/main/java/com/gmail/nossr50/datatypes/mods/CustomItem.java index 7e04b4f52..389f16826 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/mods/CustomItem.java +++ b/src/main/java/com/gmail/nossr50/datatypes/mods/CustomItem.java @@ -1,20 +1,10 @@ package com.gmail.nossr50.datatypes.mods; -import org.bukkit.inventory.ItemStack; - public class CustomItem { protected int itemID; - protected boolean repairable; - protected ItemStack repairMaterial; - protected int repairQuantity; - protected short durability; - public CustomItem(short durability, ItemStack repairMaterial, int repairQuantity, boolean repairable, int itemID) { + public CustomItem(int itemID) { this.itemID = itemID; - this.repairable = repairable; - this.repairMaterial = repairMaterial; - this.repairQuantity = repairQuantity; - this.durability = durability; } public int getItemID() { @@ -24,37 +14,4 @@ public class CustomItem { public void setItemID(int itemID) { this.itemID = itemID; } - - - public boolean isRepairable() { - return repairable; - } - - public void setRepairable(boolean repairable) { - this.repairable = repairable; - } - - public ItemStack getRepairMaterial() { - return repairMaterial; - } - - public void setRepairMaterial(ItemStack repairMaterial) { - this.repairMaterial = repairMaterial; - } - - public int getRepairQuantity() { - return repairQuantity; - } - - public void setRepairQuantity(int repairQuantity) { - this.repairQuantity = repairQuantity; - } - - public short getDurability() { - return durability; - } - - public void setDurability(short durability) { - this.durability = durability; - } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/mods/CustomTool.java b/src/main/java/com/gmail/nossr50/datatypes/mods/CustomTool.java index c7a85d932..d865f66a1 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/mods/CustomTool.java +++ b/src/main/java/com/gmail/nossr50/datatypes/mods/CustomTool.java @@ -1,14 +1,12 @@ package com.gmail.nossr50.datatypes.mods; -import org.bukkit.inventory.ItemStack; - public class CustomTool extends CustomItem { private double xpMultiplier; private boolean abilityEnabled; private int tier; - public CustomTool(short durability, ItemStack repairMaterial, int repairQuantity, boolean repairable, int tier, boolean abilityEnabled, double xpMultiplier, int itemID) { - super(durability, repairMaterial, repairQuantity, repairable, itemID); + public CustomTool(int tier, boolean abilityEnabled, double xpMultiplier, int itemID) { + super(itemID); this.xpMultiplier = xpMultiplier; this.abilityEnabled = abilityEnabled; this.tier = tier;