From 1908b1d83e2c9c50318163bcdbdf6d1ac78281d3 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 30 Mar 2023 18:47:05 +0100 Subject: [PATCH] Debug for SkillBuffs. --- .../src/main/java/net/Indyuce/mmocore/MMOCore.java | 8 ++++++++ .../main/java/net/Indyuce/mmocore/skill/ClassSkill.java | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java index e059aa65..a8647c2b 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -45,6 +45,9 @@ import net.Indyuce.mmocore.script.mechanic.ManaMechanic; import net.Indyuce.mmocore.script.mechanic.StaminaMechanic; import net.Indyuce.mmocore.script.mechanic.StelliumMechanic; import net.Indyuce.mmocore.skill.cast.SkillCastingMode; +import net.Indyuce.mmocore.skill.list.Ambers; +import net.Indyuce.mmocore.skill.list.Neptune_Gift; +import net.Indyuce.mmocore.skill.list.Sneaky_Picky; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -114,6 +117,11 @@ public class MMOCore extends JavaPlugin { MythicLib.plugin.getSkills().registerMechanic("stellium", config -> new StelliumMechanic(config)); MythicLib.plugin.getSkills().registerMechanic("mmocore_experience", config -> new ExperienceMechanic(config)); + //MMOCore Skills + MythicLib.plugin.getSkills().registerSkillHandler(new Ambers()); + MythicLib.plugin.getSkills().registerSkillHandler(new Neptune_Gift()); + MythicLib.plugin.getSkills().registerSkillHandler(new Sneaky_Picky()); + // Register extra objective, drop items... if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) loadManager.registerLoader(new WorldGuardMMOLoader()); diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/ClassSkill.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/ClassSkill.java index 4a2cf373..c0867832 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/ClassSkill.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/skill/ClassSkill.java @@ -107,7 +107,9 @@ public class ClassSkill implements CooldownObject { // Calculate placeholders Placeholders placeholders = new Placeholders(); - modifiers.keySet().forEach(modifier -> placeholders.register(modifier, modifiers.get(modifier).getDisplay(x))); + modifiers.keySet().forEach(modifier -> + placeholders.register(modifier, data.getMMOPlayerData().getSkillBuffMap() + .getSkillInstance(skill.getHandler().getId()).getSkillModifier(modifier).getTotal(modifiers.get(modifier).calculate(x)))); placeholders.register("mana_name", data.getProfess().getManaDisplay().getName()); placeholders.register("mana_color", data.getProfess().getManaDisplay().getFull().toString());