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

fix: PAPI placeholders not being applied in displaynames in guis

This commit is contained in:
LoJoSho
2023-06-28 18:06:58 -05:00
parent 6498cb43ea
commit 344aaf32e0

View File

@@ -152,6 +152,10 @@ public class TypeCosmetic extends Type {
private ItemMeta processLoreLines(CosmeticUser user, @NotNull ItemMeta itemMeta) {
List<String> processedLore = new ArrayList<>();
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")) loreLine = PlaceholderAPI.setPlaceholders(user.getPlayer(), loreLine);