forked from Upstream/mmocore
Fixed a bug related to lore parsing in skill-list.yml
This commit is contained in:
parent
fb0dbad80f
commit
90e0c349a4
@ -200,17 +200,19 @@ public class SkillList extends EditableInventory {
|
|||||||
List<String> lore = new ArrayList<>(getLore());
|
List<String> lore = new ArrayList<>(getLore());
|
||||||
|
|
||||||
int index = lore.indexOf("{slot-lore}");
|
int index = lore.indexOf("{slot-lore}");
|
||||||
lore.remove(index);
|
if (index != -1) {
|
||||||
List<String> slotLore = skillSlot.getLore();
|
lore.remove(index);
|
||||||
for (int j = 0; j < slotLore.size(); j++)
|
List<String> slotLore = skillSlot.getLore();
|
||||||
lore.add(index + j, slotLore.get(j));
|
for (int j = 0; j < slotLore.size(); j++)
|
||||||
|
lore.add(index + j, slotLore.get(j));
|
||||||
|
}
|
||||||
index = lore.indexOf("{skill-lore}");
|
index = lore.indexOf("{skill-lore}");
|
||||||
lore.remove(index);
|
if (index != -1) {
|
||||||
List<String> skillLore = boundSkill == null ? new ArrayList() : boundSkill.calculateLore(inv.getPlayerData());
|
lore.remove(index);
|
||||||
for (int j = 0; j < skillLore.size(); j++)
|
List<String> skillLore = boundSkill == null ? new ArrayList() : boundSkill.calculateLore(inv.getPlayerData());
|
||||||
lore.add(index + j, skillLore.get(j));
|
for (int j = 0; j < skillLore.size(); j++)
|
||||||
|
lore.add(index + j, skillLore.get(j));
|
||||||
|
}
|
||||||
|
|
||||||
for (int j = 0; j < lore.size(); j++)
|
for (int j = 0; j < lore.size(); j++)
|
||||||
lore.set(j, ChatColor.GRAY + holders.apply(inv.getPlayer(), lore.get(j)));
|
lore.set(j, ChatColor.GRAY + holders.apply(inv.getPlayer(), lore.get(j)));
|
||||||
|
Loading…
Reference in New Issue
Block a user