Skip to content

Commit

Permalink
- fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol committed Apr 27, 2024
1 parent b5e1b09 commit 78a7013
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>betterbox.mine.game</groupId>
<artifactId>BetterElo</artifactId>
<version>4.3.23-SNAPSHOT</version>
<version>4.3.25-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/betterbox/mine/game/betterelo/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,11 @@ public void onInventoryClick(InventoryClickEvent event) {
ItemStack result = item0.clone();
ItemMeta resultMeta = result.getItemMeta();
List<String> 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..." );
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/betterbox/mine/game/betterelo/GuiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ private void updateResultSlot(Inventory inv) {
ItemStack result = item0.clone();
ItemMeta resultMeta = result.getItemMeta();
List<String> 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;
}
Expand Down

0 comments on commit 78a7013

Please sign in to comment.