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

feat: add PAPI support for display names

This commit is contained in:
LoJoSho
2023-06-16 22:33:59 -05:00
parent 407061d125
commit 6d8c46783f

View File

@@ -243,6 +243,11 @@ public class CosmeticUser {
processedLore.add(loreLine);
}
}
if (itemMeta.hasDisplayName()) {
String displayName = itemMeta.getDisplayName();
if (Hooks.isActiveHook("PlaceholderAPI")) displayName = PlaceholderAPI.setPlaceholders(getPlayer(), displayName);
itemMeta.setDisplayName(displayName);
}
itemMeta.setLore(processedLore);
if (colors.containsKey(cosmetic.getSlot())) {