1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-07-11 01:54:42 +02:00

getRepairable by id

This commit is contained in:
NuclearW
2012-05-22 05:27:08 -04:00
parent 4e224d761e
commit 8feaf4410f
2 changed files with 13 additions and 0 deletions
src/main/java/com/gmail/nossr50/skills/repair

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

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