Debug for SkillBuffs.

This commit is contained in:
Ka0rX 2023-03-30 18:47:05 +01:00
parent ddd3034584
commit 1908b1d83e
2 changed files with 11 additions and 1 deletions

View File

@ -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());

View File

@ -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());