mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
getRepairable by id
This commit is contained in:
parent
4e224d761e
commit
8feaf4410f
@ -36,6 +36,14 @@ public interface RepairManager {
|
|||||||
*/
|
*/
|
||||||
public boolean isRepairable(ItemStack itemStack);
|
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
|
* Handle the repairing of this object
|
||||||
*
|
*
|
||||||
|
@ -52,6 +52,11 @@ public class SimpleRepairManager implements RepairManager {
|
|||||||
return isRepairable(itemStack.getTypeId());
|
return isRepairable(itemStack.getTypeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Repairable getRepairable(int id) {
|
||||||
|
return repairables.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleRepair(Player player, ItemStack item) {
|
public void handleRepair(Player player, ItemStack item) {
|
||||||
// Load some variables for use
|
// Load some variables for use
|
||||||
|
Loading…
Reference in New Issue
Block a user