mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-28 19:39:14 +00:00
Fixed title PAPI placeholder
This commit is contained in:
@@ -89,7 +89,7 @@ public class DyeGuiSerializer implements TypeSerializer<DyeSelectorGui> {
|
||||
return new DyeSelectorGui(
|
||||
plugin,
|
||||
Adventure.SERIALIZER.serialize(
|
||||
Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(null, title))),
|
||||
Adventure.MINI_MESSAGE.parse(title)),
|
||||
rowsNode.getInt(),
|
||||
guiItemMap);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GuiSerializer implements TypeSerializer<CosmeticGui> {
|
||||
|
||||
return new CosmeticGui(plugin,
|
||||
Adventure.SERIALIZER.serialize(
|
||||
Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(null, title))),
|
||||
Adventure.MINI_MESSAGE.parse(title)),
|
||||
rowsNode.getInt(),
|
||||
guiItemMap);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.github.fisher2911.hmccosmetics.message.MessageHandler;
|
||||
import io.github.fisher2911.hmccosmetics.message.Messages;
|
||||
import io.github.fisher2911.hmccosmetics.message.Placeholder;
|
||||
import io.github.fisher2911.hmccosmetics.user.User;
|
||||
import io.github.fisher2911.hmccosmetics.util.StringUtils;
|
||||
import io.github.fisher2911.hmccosmetics.util.builder.ItemBuilder;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
@@ -165,7 +166,7 @@ public class CosmeticGui {
|
||||
final User user = optionalUser.get();
|
||||
|
||||
this.gui = Gui.gui().
|
||||
title(Adventure.MINI_MESSAGE.parse(this.title)).
|
||||
title(Adventure.MINI_MESSAGE.parse(StringUtils.applyPapiPlaceholders(user.getPlayer(), this.title))).
|
||||
rows(this.rows).
|
||||
create();
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import dev.triumphteam.gui.guis.GuiItem;
|
||||
import io.github.fisher2911.hmccosmetics.HMCCosmetics;
|
||||
import io.github.fisher2911.hmccosmetics.inventory.PlayerArmor;
|
||||
import io.github.fisher2911.hmccosmetics.user.User;
|
||||
import io.github.fisher2911.hmccosmetics.util.StringUtils;
|
||||
import io.github.fisher2911.hmccosmetics.util.builder.ColorBuilder;
|
||||
import io.github.fisher2911.hmccosmetics.util.builder.ItemBuilder;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@@ -30,7 +31,7 @@ public class DyeSelectorGui extends CosmeticGui {
|
||||
|
||||
public Gui getGui(final User user, final ArmorItem armorItem) {
|
||||
final Gui gui = Gui.gui().
|
||||
title(Component.text(this.title)).
|
||||
title(Component.text(StringUtils.applyPapiPlaceholders(user.getPlayer(), this.title))).
|
||||
rows(rows).
|
||||
create();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user