diff --git a/src/main/java/net/Indyuce/mmocore/listener/option/VanillaExperienceOverride.java b/src/main/java/net/Indyuce/mmocore/listener/option/VanillaExperienceOverride.java index e301244f..79d421c6 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/option/VanillaExperienceOverride.java +++ b/src/main/java/net/Indyuce/mmocore/listener/option/VanillaExperienceOverride.java @@ -11,11 +11,20 @@ import net.Indyuce.mmocore.api.player.PlayerData; public class VanillaExperienceOverride implements Listener { + /* + * when picking up exp orbs or any action like that + */ @EventHandler public void a(PlayerExpChangeEvent event) { event.setAmount(0); } + /* + * this event is not supported by the expChangeEvent. since the event is + * actually called before applying the enchant and consuming levels, we must + * update the player level using a delayed task. setExpLevelCost(level) DOES + * NOT WORK + */ @EventHandler public void b(EnchantItemEvent event) { Bukkit.getScheduler().runTask(MMOCore.plugin, () -> event.getEnchanter().setLevel(PlayerData.get(event.getEnchanter()).getLevel())); diff --git a/src/main/resources/default/gui/player-stats.yml b/src/main/resources/default/gui/player-stats.yml index 90016848..3efde53a 100644 --- a/src/main/resources/default/gui/player-stats.yml +++ b/src/main/resources/default/gui/player-stats.yml @@ -202,7 +202,7 @@ items: - '✦ Attack Speed: &c{attack_speed} &7(&c{attack_speed_base}&7+&c{attack_speed_extra}&7)' - '' - '❤ Max Health: &c{max_health} &7(&c{max_health_base}&7+&c{max_health_extra}&7)' - - '❤ Health Regen: &c{attack_speed} &7(&c{attack_speed_base}&7+&c{attack_speed_extra}&7)' + - '❤ Health Regen: &c{health_regeneration} &7(&c{health_regeneration_base}&7+&c{health_regeneration_extra}&7)' - '' - '❖ Armor: &c{armor} &7(&c{armor_base}&7+&c{armor_extra}&7)' - '❖ Armor Toughness: &c{armor_toughness} &7(&c{armor_toughness_base}&7+&c{armor_toughness_extra}&7)'