mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 21:24:43 +02:00
new config pt 10 - All configs are now managed by ConfigManager (WIP)
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
package com.gmail.nossr50.skills.salvage.salvageables;
|
||||
|
||||
import com.gmail.nossr50.config.Unload;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SalvageableManager {
|
||||
public interface SalvageableManager extends Unload {
|
||||
/**
|
||||
* Register a salvageable with the SalvageManager
|
||||
*
|
||||
|
@ -10,12 +10,18 @@ import java.util.List;
|
||||
public class SimpleSalvageableManager implements SalvageableManager {
|
||||
private HashMap<Material, Salvageable> salvageables;
|
||||
|
||||
public SimpleSalvageableManager() {
|
||||
/*public SimpleSalvageableManager() {
|
||||
this(55);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void unload() {
|
||||
salvageables.clear();
|
||||
}
|
||||
|
||||
public SimpleSalvageableManager(int salvageablesSize) {
|
||||
this.salvageables = new HashMap<Material, Salvageable>(salvageablesSize);
|
||||
public SimpleSalvageableManager(List<Salvageable> salvageablesCollection) {
|
||||
this.salvageables = new HashMap<Material, Salvageable>(salvageablesCollection.size());
|
||||
registerSalvageables(salvageablesCollection);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user