Remove unused variables & methods from old repair system

This commit is contained in:
GJ 2012-05-22 08:37:32 -04:00
parent a336e9f460
commit 049338e83b
4 changed files with 7 additions and 60 deletions

View File

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

View File

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

View File

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

View File

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