mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Beginnings of RepairManager interface
Not sure yet exactly what to leave in Repair and what to have in the Manager implementation. I'm fairly sure that the xpHandler should be in Repair, but that's private at the moment so usage from the Manager is impossible except with public modifier, which is unacceptable. Considering moving Repair to the new repair package, perhaps eventually all skills will have packages and skills. Moving it seems like the logical solution with protected modifier.
This commit is contained in:
parent
2a46a5c00a
commit
a9295751c8
@ -0,0 +1,29 @@
|
||||
package com.gmail.nossr50.skills.repair;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public interface RepairManager {
|
||||
/**
|
||||
* Register a repairable with the RepairManager
|
||||
*
|
||||
* @param repairable Repairable to register
|
||||
*/
|
||||
public void registerRepairable(Repairable repairable);
|
||||
|
||||
/**
|
||||
* Checks if an item is repairable
|
||||
*
|
||||
* @param itemId id to check if repairable
|
||||
* @return true if repairable, false if not
|
||||
*/
|
||||
public boolean isRepairable(int itemId);
|
||||
|
||||
/**
|
||||
* Handle the repairing of this object
|
||||
*
|
||||
* @param player Player that is repairing an item
|
||||
* @param item ItemStack that is being repaired
|
||||
*/
|
||||
public void handleRepair(Player player, ItemStack item);
|
||||
}
|
Loading…
Reference in New Issue
Block a user