Implement new repairable stuff for custom tools/armor.

This commit is contained in:
GJ 2012-05-22 08:21:05 -04:00
parent c5183309ae
commit 0294cf8c4a
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.mods.CustomItem;
import com.gmail.nossr50.skills.repair.Repairable;
import com.gmail.nossr50.skills.repair.RepairableFactory;
public class CustomArmorConfig extends ModConfigLoader{
private static CustomArmorConfig instance;
@ -91,6 +92,7 @@ public class CustomArmorConfig extends ModConfigLoader{
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 {

View File

@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.mods.CustomTool;
import com.gmail.nossr50.skills.repair.Repairable;
import com.gmail.nossr50.skills.repair.RepairableFactory;
public class CustomToolsConfig extends ModConfigLoader {
private static CustomToolsConfig instance;
@ -98,6 +99,7 @@ public class CustomToolsConfig extends ModConfigLoader {
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 {