From d1be5cbce72c63cf8618fb26c7a0f6980045bcc2 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 20 Apr 2023 20:12:03 +0100 Subject: [PATCH] Fixed issue #794 about passive-skill-need-bound being disabled. --- .../mmocore/api/player/stats/PlayerStats.java | 12 ++++++------ MMOCore-Dist/src/main/resources/config.yml | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java index 19070ae6..ed6a2e92 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java @@ -99,12 +99,12 @@ public class PlayerStats { */ final PassiveSkillMap skillMap = data.getMMOPlayerData().getPassiveSkillMap(); - //if (!MMOCore.plugin.configManager.passiveSkillNeedBound) { - // skillMap.removeModifiers("MMOCorePassiveSkill"); - // for (ClassSkill skill : data.getProfess().getSkills()) - // if (skill.getSkill().getTrigger().isPassive()) - // skillMap.addModifier(skill.toPassive(data)); - //} + if (!MMOCore.plugin.configManager.passiveSkillNeedBound) { + skillMap.removeModifiers("MMOCorePassiveSkill"); + for (ClassSkill skill : data.getProfess().getSkills()) + if (skill.getSkill().getTrigger().isPassive()) + skillMap.addModifier(skill.toPassive(data)); + } // This updates the player's class SCRIPTS skillMap.removeModifiers("MMOCoreClassScript"); diff --git a/MMOCore-Dist/src/main/resources/config.yml b/MMOCore-Dist/src/main/resources/config.yml index 6744a1da..6ed89c5a 100644 --- a/MMOCore-Dist/src/main/resources/config.yml +++ b/MMOCore-Dist/src/main/resources/config.yml @@ -209,8 +209,7 @@ max-skill-slots: 8 # When set to true, passive skills must be bound in order to take effect. # When set to false, unlocked skills will take effect right away. -# Temporarily disabled. -# passive-skill-need-bound: true +passive-skill-need-bound: true # Fun extra RPG feature that switches the player's hotbar with # the 9 lower row items of his inventory. This allows the player