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 { 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()); } }