mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 08:55:26 +01:00
Convenience method for RepairManager
This commit is contained in:
parent
160004fa7e
commit
28578bd6b0
@ -28,6 +28,14 @@ public interface RepairManager {
|
||||
*/
|
||||
public boolean isRepairable(int itemId);
|
||||
|
||||
/**
|
||||
* Checks if an item is repairable
|
||||
*
|
||||
* @param itemStack Item to check if repairable
|
||||
* @return true if repairable, false if not
|
||||
*/
|
||||
public boolean isRepairable(ItemStack itemStack);
|
||||
|
||||
/**
|
||||
* Handle the repairing of this object
|
||||
*
|
||||
|
@ -35,6 +35,11 @@ public class SimpleRepairManager implements RepairManager {
|
||||
return repairables.containsKey(itemId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepairable(ItemStack itemStack) {
|
||||
return isRepairable(itemStack.getTypeId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRepair(Player player, ItemStack item) {
|
||||
// TODO Auto-generated method stub
|
||||
|
Loading…
x
Reference in New Issue
Block a user