From e35a29a13b6edc85c223efe3512605c9e6d7f399 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Thu, 29 Jun 2023 09:57:08 -0500 Subject: [PATCH] feat: empty cosmetic type item name go through PAPI --- .../com/hibiscusmc/hmccosmetics/gui/type/types/TypeEmpty.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/type/types/TypeEmpty.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/type/types/TypeEmpty.java index 94f08ad7..304ea9f2 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/type/types/TypeEmpty.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/gui/type/types/TypeEmpty.java @@ -58,6 +58,10 @@ public class TypeEmpty extends Type { List processedLore = new ArrayList<>(); ItemMeta itemMeta = itemStack.getItemMeta(); + if (itemMeta.hasDisplayName()) { + if (Hooks.isActiveHook("PlaceholderAPI")) itemMeta.setDisplayName(PlaceholderAPI.setPlaceholders(user.getPlayer(), itemMeta.getDisplayName())); + } + if (itemMeta.hasLore()) { for (String loreLine : itemMeta.getLore()) { if (Hooks.isActiveHook("PlaceholderAPI"))