diff --git a/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java b/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java index 0dbd8859..79328c22 100644 --- a/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java +++ b/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java @@ -49,7 +49,7 @@ public class PlayerActionBar extends BukkitRunnable { .replace("{stellium}", digit.format(data.getStellium())) .replace("{max_stellium}", StatInfo.valueOf("MAX_STELLIUM").format(data.getStats().getStat("MAX_STELLIUM"))) .replace("{class}", data.getProfess().getName()) - .replace("{xp}", "" + data.getExperience()) + .replace("{xp}", MythicLib.plugin.getMMOConfig().decimal.format(data.getExperience())) .replace("{armor}", StatInfo.valueOf("ARMOR").format(data.getPlayer().getAttribute(Attribute.GENERIC_ARMOR).getValue())) .replace("{level}", "" + data.getLevel()) .replace("{name}", data.getPlayer().getDisplayName()))))); diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index b8e3922c..b3c3797d 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.api.player; +import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.player.MMOPlayerData; import io.lumine.mythic.lib.player.TemporaryPlayerData; import io.lumine.mythic.lib.player.cooldown.CooldownMap; @@ -560,7 +561,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc // Experience hologram if (hologramLocation != null && isOnline()) - MMOCoreUtils.displayIndicator(hologramLocation, MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", String.valueOf(event.getExperience())).message()); + MMOCoreUtils.displayIndicator(hologramLocation, MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", MythicLib.plugin.getMMOConfig().decimal.format(event.getExperience())).message()); experience = Math.max(0, experience + event.getExperience()); diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/ExperienceCommandTreeNode.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/ExperienceCommandTreeNode.java index 5bd2d305..9bf465de 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/ExperienceCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/ExperienceCommandTreeNode.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.command.rpg.admin; +import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.command.api.CommandTreeNode; import io.lumine.mythic.lib.command.api.Parameter; import net.Indyuce.mmocore.MMOCore; @@ -68,7 +69,7 @@ public class ExperienceCommandTreeNode extends CommandTreeNode { if (args[4].equalsIgnoreCase("main")) { main.accept(data, amount); CommandVerbose.verbose(sender, CommandVerbose.CommandType.EXPERIENCE, ChatColor.GOLD + player.getName() + ChatColor.YELLOW - + " now has " + ChatColor.GOLD + data.getExperience() + ChatColor.YELLOW + " EXP."); + + " now has " + ChatColor.GOLD + MythicLib.plugin.getMMOConfig().decimal.format(data.getExperience()) + ChatColor.YELLOW + " EXP."); return CommandResult.SUCCESS; } diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandTreeNode.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandTreeNode.java index 4b26626e..fcb7416b 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/InfoCommandTreeNode.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.command.rpg.admin; +import io.lumine.mythic.lib.MythicLib; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -33,7 +34,7 @@ public class InfoCommandTreeNode extends CommandTreeNode { sender.sendMessage(ChatColor.YELLOW + "----------------------------------------------------"); sender.sendMessage(ChatColor.YELLOW + "Class: " + ChatColor.GOLD + playerData.getProfess().getName()); sender.sendMessage(ChatColor.YELLOW + "Level: " + ChatColor.GOLD + playerData.getLevel()); - sender.sendMessage(ChatColor.YELLOW + "Experience: " + ChatColor.GOLD + playerData.getExperience() + ChatColor.YELLOW + " / " + ChatColor.GOLD + sender.sendMessage(ChatColor.YELLOW + "Experience: " + ChatColor.GOLD + MythicLib.plugin.getMMOConfig().decimal.format(playerData.getExperience()) + ChatColor.YELLOW + " / " + ChatColor.GOLD + playerData.getLevelUpExperience()); sender.sendMessage(ChatColor.YELLOW + "Class Points: " + ChatColor.GOLD + playerData.getClassPoints()); sender.sendMessage(ChatColor.YELLOW + "Quests: " + ChatColor.GOLD + playerData.getQuestData().getFinishedQuests().size() + ChatColor.YELLOW diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 944b25e6..ca6556eb 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -128,7 +128,7 @@ public class RPGPlaceholders extends PlaceholderExpansion { .valueOf(playerData.getCollectionSkills().getLevel(identifier.substring(11).replace(" ", "-").replace("_", "-").toLowerCase())); else if (identifier.equals("experience")) - return String.valueOf(playerData.getExperience()); + return MythicLib.plugin.getMMOConfig().decimal.format(playerData.getExperience()); else if (identifier.equals("next_level")) return String.valueOf(playerData.getLevelUpExperience()); diff --git a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java index 9b0d11c1..9a364586 100644 --- a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java +++ b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java @@ -187,7 +187,7 @@ public class PlayerProfessions { // Display hologram if (hologramLocation != null) - MMOCoreUtils.displayIndicator(hologramLocation.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message()); + MMOCoreUtils.displayIndicator(hologramLocation.add(.5, 1.5, .5), MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", MythicLib.plugin.getMMOConfig().decimal.format(event.getExperience())).message()); exp.put(profession.getId(), Math.max(0, exp.getOrDefault(profession.getId(), 0.) + event.getExperience())); int level, oldLevel = getLevel(profession); diff --git a/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java b/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java index 63759744..9f306d65 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java +++ b/src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.gui; +import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.api.stat.modifier.StatModifier; import io.lumine.mythic.lib.version.VersionMaterial; @@ -243,7 +244,7 @@ public class PlayerStats extends EditableInventory { bar.append(j == chars ? "" + ChatColor.WHITE + ChatColor.BOLD : "").append("|"); holders.register("percent", decimal.format(ratio * 100)); - holders.register("exp", "" + data.getExperience()); + holders.register("exp", MythicLib.plugin.getMMOConfig().decimal.format(data.getExperience())); holders.register("level", "" + data.getLevel()); holders.register("class_points", "" + data.getClassPoints()); holders.register("skill_points", "" + data.getSkillPoints()); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e2fee491..141b310d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -227,7 +227,8 @@ resource-bar-colors: # When set to true, attributes are saved and # reset when a player changes their class. -attributes-as-class-info: true +# Not implemented yet. +# attributes-as-class-info: true # Whether or not the admin commands should display # the result of the command when ran.