diff --git a/pom.xml b/pom.xml index be5519e..e694c35 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ betterbox.mine.game BetterElo - 4.3.23-SNAPSHOT + 4.3.25-SNAPSHOT jar BetterElo diff --git a/src/main/java/betterbox/mine/game/betterelo/Event.java b/src/main/java/betterbox/mine/game/betterelo/Event.java index ac7a0fd..fbb0d54 100644 --- a/src/main/java/betterbox/mine/game/betterelo/Event.java +++ b/src/main/java/betterbox/mine/game/betterelo/Event.java @@ -1361,8 +1361,11 @@ public void onInventoryClick(InventoryClickEvent event) { ItemStack result = item0.clone(); ItemMeta resultMeta = result.getItemMeta(); List lore = new ArrayList<>(resultMeta.getLore()); + boolean mobDamage=false; for (int i = 0; i < lore.size(); i++) { - if (lore.get(i).contains("Average Damage")) { + if(lore.get(i).contains("Mob Damage")) + mobDamage=true; + if (lore.get(i).contains("Average Damage") && mobDamage) { pluginLogger.log(PluginLogger.LogLevel.DEBUG, "GuiManager.onInventoryClick reroll, Average Damage lore line found i: " + i); if( guiManager.checkAndRemoveEnchantItem(player)) { pluginLogger.log(PluginLogger.LogLevel.DEBUG, "GuiManager.onInventoryClick reroll, player paid, re-rolling..." ); diff --git a/src/main/java/betterbox/mine/game/betterelo/GuiManager.java b/src/main/java/betterbox/mine/game/betterelo/GuiManager.java index 7235f3b..fa96426 100644 --- a/src/main/java/betterbox/mine/game/betterelo/GuiManager.java +++ b/src/main/java/betterbox/mine/game/betterelo/GuiManager.java @@ -122,8 +122,11 @@ private void updateResultSlot(Inventory inv) { ItemStack result = item0.clone(); ItemMeta resultMeta = result.getItemMeta(); List lore = new ArrayList<>(resultMeta.getLore()); + boolean mobDamage = false; for (int i = 0; i < lore.size(); i++) { - if (lore.get(i).contains("Average Damage")) { + if(lore.get(i).contains("Mob Damage")) + mobDamage=true; + if (lore.get(i).contains("Average Damage")&& mobDamage) { lore.set(i, customMobs.dropAverageDamage()); break; }