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 ae8a5b28f..9469fbff3 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -36,6 +36,14 @@ public interface RepairManager { */ public boolean isRepairable(ItemStack itemStack); + /** + * Gets the repairable with this id + * + * @param id Id of the repairable to look for + * @return the repairable, can be null + */ + public Repairable getRepairable(int id); + /** * Handle the repairing of this object * diff --git a/src/main/java/com/gmail/nossr50/skills/repair/SimpleRepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/SimpleRepairManager.java index 6c08a6405..0b55dd573 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/SimpleRepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/SimpleRepairManager.java @@ -52,6 +52,11 @@ public class SimpleRepairManager implements RepairManager { return isRepairable(itemStack.getTypeId()); } + @Override + public Repairable getRepairable(int id) { + return repairables.get(id); + } + @Override public void handleRepair(Player player, ItemStack item) { // Load some variables for use