diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 66d01330d..956f6c3f6 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -57,7 +57,7 @@ public class Repair { return ""; } - protected static Material getSalvagedItem(ItemStack inHand) { + protected static Material getRepairAndSalvageItem(ItemStack inHand) { if (ItemUtils.isDiamondTool(inHand) || ItemUtils.isDiamondArmor(inHand)) { return Material.DIAMOND; } @@ -84,7 +84,7 @@ public class Repair { } } - protected static int getSalvagedAmount(ItemStack inHand) { + public static int getRepairAndSalvageQuantities(ItemStack inHand) { // Temporary workaround until they get their stuff fixed. if (mcMMO.isMCPCEnabled()) { if (ItemUtils.isPickaxe(inHand) || ItemUtils.isAxe(inHand) || ItemUtils.isBow(inHand) || inHand.getType() == Material.BUCKET) { @@ -113,11 +113,7 @@ public class Repair { } } - return getRepairAndSalvageQuantities(inHand, getSalvagedItem(inHand), (byte) -1); - } - - public static int getRepairAndSalvageQuantities(ItemStack item) { - return getRepairAndSalvageQuantities(item, null, (byte) -1); + return getRepairAndSalvageQuantities(inHand, getRepairAndSalvageItem(inHand), (byte) -1); } public static int getRepairAndSalvageQuantities(ItemStack item, Material repairMaterial, byte repairMetadata) { diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index 28976a04e..58e948dc6 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -163,7 +163,7 @@ public class RepairManager extends SkillManager { player.setItemInHand(new ItemStack(Material.AIR)); location.setY(location.getY() + 1); - Misc.dropItems(location, new ItemStack(Repair.getSalvagedItem(item)), Repair.getSalvagedAmount(item) * item.getAmount()); + Misc.dropItems(location, new ItemStack(Repair.getRepairAndSalvageItem(item)), Repair.getRepairAndSalvageQuantities(item) * item.getAmount()); player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH); player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));