Added {skill-lore} placeholder for SlotItem in gui/skill-list.yml acccodring to issue #854

This commit is contained in:
Ka0rX 2023-05-31 16:15:18 +01:00
parent 034200f021
commit f130f2aac9

View File

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