22 lines
753 B
Java
22 lines
753 B
Java
package net.crankedpvp.loottable.data;
|
|
|
|
import net.crankedpvp.loottable.LootTablePlugin;
|
|
import net.crankedpvp.loottable.struct.LootTableType;
|
|
import net.crankedpvp.storageutils.StorageUtils;
|
|
import net.crankedpvp.storageutils.utils.SaveLoadManager;
|
|
|
|
public class LootTableManager extends SaveLoadManager<LootTable> {
|
|
public LootTableManager(LootTablePlugin plugin) {
|
|
super(plugin, LootTablePlugin.getInstance().getGson(), "/data", LootTable.class);
|
|
}
|
|
|
|
public LootTable getLootTable(LootTableType lootTableType) {
|
|
if (!containsKey(lootTableType.name())) {
|
|
LootTable lootTable = new LootTable(lootTableType);
|
|
addToCache(lootTable);
|
|
}
|
|
return getFromCache(lootTableType.name());
|
|
|
|
}
|
|
}
|