9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 04:19:28 +00:00

Fix item not loading when lore is not present

This commit is contained in:
LoJoSho
2022-12-28 16:47:32 -06:00
parent 23cac12003
commit b1b5545c9c

View File

@@ -126,9 +126,11 @@ public class Menu {
if (item.hasItemMeta()) {
List<String> processedLore = new ArrayList<>();
for (String loreLine : item.getItemMeta().getLore()) {
processedLore.add(loreLine.replaceAll("%allowed%", "allowed?"));
// TODO apply placeholders here
if (item.getItemMeta().hasLore()) {
for (String loreLine : item.getItemMeta().getLore()) {
processedLore.add(loreLine.replaceAll("%allowed%", "allowed?"));
// TODO apply placeholders here
}
}
ItemMeta itemMeta = item.getItemMeta();