Fixed 'main-exp-split'

This commit is contained in:
Jules 2023-03-24 23:34:59 +01:00
parent cec44d1647
commit 588665f0b7
2 changed files with 3 additions and 2 deletions

View File

@ -237,11 +237,11 @@ public class PlayerProfessions {
}
StringBuilder bar = new StringBuilder("" + ChatColor.BOLD);
int chars = (int) ((double) exp / needed * 20);
int chars = (int) (exp / needed * 20);
for (int j = 0; j < 20; j++)
bar.append(j == chars ? "" + ChatColor.WHITE + ChatColor.BOLD : "").append("|");
if (playerData.isOnline())
MMOCore.plugin.configManager.getSimpleMessage("exp-notification", "profession", profession.getName(), "progress", bar.toString(), "ratio",
MythicLib.plugin.getMMOConfig().decimal.format((double) exp / needed * 100)).send(playerData.getPlayer());
MythicLib.plugin.getMMOConfig().decimal.format(exp / needed * 100)).send(playerData.getPlayer());
}
}

View File

@ -130,6 +130,7 @@ public class ConfigManager {
fishingDropsChanceWeight = MMOCore.plugin.getConfig().getDouble("chance-stat-weight.fishing-drops");
maxPartyLevelDifference = MMOCore.plugin.getConfig().getInt("party.max-level-difference");
partyMaxExpSplitRange = MMOCore.plugin.getConfig().getDouble("party.max-exp-split-range");
splitMainExp = MMOCore.plugin.getConfig().getBoolean("party.main-exp-split");
splitProfessionExp = MMOCore.plugin.getConfig().getBoolean("party.profession-exp-split");
disableQuestBossBar = MMOCore.plugin.getConfig().getBoolean("mmocore-quests.disable-boss-bar");