9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-27 10:59:14 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
LoJoSho
b37083a298 version bump (2.4.9) 2023-06-29 10:00:24 -05:00
LoJoSho
e35a29a13b feat: empty cosmetic type item name go through PAPI 2023-06-29 09:57:08 -05:00
LoJoSho
344aaf32e0 fix: PAPI placeholders not being applied in displaynames in guis 2023-06-28 18:06:58 -05:00
LoJoSho
6498cb43ea version bump (2.4.9-DEV) 2023-06-28 18:06:41 -05:00
3 changed files with 9 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ plugins {
}
group = "com.hibiscusmc"
version = "2.4.8"
version = "2.4.9"
allprojects {
apply(plugin = "java")

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);

View File

@@ -58,6 +58,10 @@ public class TypeEmpty extends Type {
List<String> 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"))