mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Beginnings of RepairManager implementation
Plus more factories for a stronger economy
This commit is contained in:
parent
45fe8c182b
commit
26481c547a
@ -0,0 +1,14 @@
|
||||
package com.gmail.nossr50.skills.repair;
|
||||
|
||||
public class RepairManagerFactory {
|
||||
public static RepairManager getRepairManager() {
|
||||
// TODO: Add in loading from config what type of manager we want.
|
||||
return new SimpleRepairManager();
|
||||
}
|
||||
|
||||
|
||||
public static RepairManager getRepairManager(int repairablesSize) {
|
||||
// TODO: Add in loading from config what type of manager we want.
|
||||
return new SimpleRepairManager(repairablesSize);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.gmail.nossr50.skills.repair;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class SimpleRepairManager implements RepairManager {
|
||||
private HashMap<Integer, Repairable> repairables;
|
||||
|
||||
protected SimpleRepairManager() {
|
||||
this(55);
|
||||
}
|
||||
|
||||
protected SimpleRepairManager(int repairablesSize) {
|
||||
this.repairables = new HashMap<Integer, Repairable>(repairablesSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRepairable(Repairable repairable) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepairable(int itemId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRepair(Player player, ItemStack item) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user