Skip to content

Commit

Permalink
- fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol committed Apr 26, 2024
1 parent 9dea6f5 commit b5e1b09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 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.21-SNAPSHOT</version>
<version>4.3.23-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/betterbox/mine/game/betterelo/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,11 @@ public void onBreak(BlockBreakEvent event) {
Player player = event.getPlayer();
String uuid = player.getUniqueId().toString();
double base = configManager.blockBase;

if(!isEloAllowed(player,player.getLocation())){
pluginLogger.log(PluginLogger.LogLevel.DEBUG_LVL2, "Event: onPlayerDeath noElo zone!");
player.sendMessage(ChatColor.GOLD + "" + ChatColor.BOLD + "[BetterElo] " + ChatColor.DARK_RED + "No elo reward in this zone!");
return;
}
double playerElo = dataManager.getPoints(uuid,"main");
double pointsEarnedMain = calculatePointsEarnedFromBlock(base,playerElo,blockReward, dataManager.getMaxElo("main"), dataManager.getMinElo("main"));
addPoints(uuid,pointsEarnedMain,"main");
Expand Down Expand Up @@ -1360,7 +1364,7 @@ public void onInventoryClick(InventoryClickEvent event) {
for (int i = 0; i < lore.size(); i++) {
if (lore.get(i).contains("Average Damage")) {
pluginLogger.log(PluginLogger.LogLevel.DEBUG, "GuiManager.onInventoryClick reroll, Average Damage lore line found i: " + i);
if( guiManager.checkAndRemoveBetterCoins(player) || guiManager.checkAndRemoveEnchantItem(player)) {
if( guiManager.checkAndRemoveEnchantItem(player)) {
pluginLogger.log(PluginLogger.LogLevel.DEBUG, "GuiManager.onInventoryClick reroll, player paid, re-rolling..." );
lore.set(i, customMobs.dropAverageDamage());
player.setMetadata("avgDmgRerolled", new FixedMetadataValue(plugin, true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void openReRollGui(Player player){
createItem(inv, blank, 1, "", "");
createItem(inv, blank, 2, "", "");
createItem(inv, blank, 4, "", "");
createItem(inv, Material.GREEN_WOOL, 5, "Re-Roll Average Damage bonus", "Cost: 64x BetterCoin");
createItem(inv, Material.GREEN_WOOL, 5, "Re-Roll Average Damage bonus", "Cost: 1x "+ChatColor.DARK_PURPLE+""+ChatColor.BOLD+"Enchant Item");
createItem(inv, blank, 6, "", "");
createItem(inv, blank, 7, "", "");
createItem(inv, blank, 8, "", "");
Expand Down

0 comments on commit b5e1b09

Please sign in to comment.