From f130f2aac94049d24dbedb2a28b470597ae15b25 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Wed, 31 May 2023 16:15:18 +0100 Subject: [PATCH] Added {skill-lore} placeholder for SlotItem in gui/skill-list.yml acccodring to issue #854 --- .../src/main/java/net/Indyuce/mmocore/gui/SkillList.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java index 646d0535..b824cb7c 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java @@ -205,6 +205,13 @@ public class SkillList extends EditableInventory { for (int j = 0; j < slotLore.size(); j++) lore.add(index + j, slotLore.get(j)); + index = lore.indexOf("{skill-lore}"); + lore.remove(index); + List skillLore = boundSkill == null ? new ArrayList() : boundSkill.calculateLore(inv.getPlayerData()); + for (int j = 0; j < skillLore.size(); j++) + lore.add(index + j, skillLore.get(j)); + + for (int j = 0; j < lore.size(); j++) lore.set(j, ChatColor.GRAY + holders.apply(inv.getPlayer(), lore.get(j))); meta.setLore(lore);