diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java index bdc20a5..a9c3050 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/droptables/types/give/GiveRewardRewardsListPanel.java @@ -135,19 +135,20 @@ public class GiveRewardRewardsListPanel extends SubSubVariablePanelHandler { - Map> rewards = giveTableElement.getGiveRewards(); - Map rewardSections = rewards.get(key); - List keys = new ArrayList<>(giveTableElement.getGiveRewards().keySet()); + Map> rewardSections = giveTableElement.getGiveRewards(); + Map rewards = rewardSections.get(key); + List keys = new ArrayList<>(rewards.keySet()); int nextAvailable = NumberUtils.get().getNextAvailablePosition(keys); String nextKey = ""+nextAvailable; - if(rewardSections.containsKey(nextKey)) { + if(rewards.containsKey(nextKey)) { Debug.FAILED_TO_CREATE_NEWPOSITION.debug(nextKey, BossAPI.getDropTableName(dropTable)); return; } - rewardSections.put(nextKey, new GiveTableSubElement(new HashMap<>(), new HashMap<>(), 3, 3, false, false, 0.0)); - giveTableElement.setGiveRewards(rewards); + rewards.put(nextKey, new GiveTableSubElement(new HashMap<>(), new HashMap<>(), 3, 3, false, false, 0.0)); + rewardSections.put(key, rewards); + giveTableElement.setGiveRewards(rewardSections); saveDropTable((Player) event.getWhoClicked(), dropTable, giveTableElement, key); }; } diff --git a/pom.xml b/pom.xml index f4e8f5a..6fe4f5b 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - 1.0.0-U155 + 1.0.0-U156 EpicBosses com.songoda.epicbosses.CustomBosses AMinecraftDev