From 4b448d7fa829f753795bb1b33505714cae4706bc Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 2 Oct 2022 14:21:02 +0200 Subject: [PATCH] Debug for exp-notification messages in messages.yml --- .../net/Indyuce/mmocore/experience/PlayerProfessions.java | 4 ++-- MMOCore-Dist/src/main/resources/default/messages.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java index 4aeda68a..f28f1dd1 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java @@ -218,7 +218,7 @@ public class PlayerProfessions { if (check) { Bukkit.getPluginManager().callEvent(new PlayerLevelUpEvent(playerData, profession, oldLevel, level)); new SmallParticleEffect(playerData.getPlayer(), Particle.SPELL_INSTANT); - new ConfigMessage("profession-level-up").addPlaceholders("level", "" + level, "profession", profession.getName()) + new ConfigMessage("profession-level-up").addPlaceholders("level", "" + level, "profession", profession.getId(),"profession-name", profession.getName()) .send(playerData.getPlayer()); MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(playerData.getPlayer()); playerData.getStats().updateStats(); @@ -229,7 +229,7 @@ public class PlayerProfessions { 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", + MMOCore.plugin.configManager.getSimpleMessage("exp-notification","profession",profession.getId(), "profession-name", profession.getName(), "progress", bar.toString(), "ratio", MythicLib.plugin.getMMOConfig().decimal.format((double) exp / needed * 100)).send(playerData.getPlayer()); } } diff --git a/MMOCore-Dist/src/main/resources/default/messages.yml b/MMOCore-Dist/src/main/resources/default/messages.yml index fd5b81b8..ca7f7d1a 100644 --- a/MMOCore-Dist/src/main/resources/default/messages.yml +++ b/MMOCore-Dist/src/main/resources/default/messages.yml @@ -6,8 +6,8 @@ level-up: - '&eUse &6/p &eto see your new statistics!' - '' profession-level-up: -- '&eYou are now level &6{level}&e in &6{profession}&e!' -exp-notification: '%&f{profession} &e{progress} &e{ratio}%' +- '&eYou are now level &6{level}&e in &6{profession-name}&e!' +exp-notification: '%&f{profession-name} &e{progress} &e{ratio}%' exp-hologram: '&e+{exp} EXP!' class-select: '&eYou are now a &6{class}&e!' already-on-class: '&cYou are already a {class}.'