Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user