make papi util use minimessage serializer instead of legacy serializer because legacy serializer downsamples hex colors
This commit is contained in:
parent
c617766516
commit
c0df2f6915
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ package lol.pyr.znpcsplus.util;
|
|||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class PapiUtil {
|
|||
// Ugly workaround would be cool if a better solution existed
|
||||
public static Component set(Player player, Component component) {
|
||||
if (!isSupported()) return component;
|
||||
LegacyComponentSerializer serializer = LegacyComponentSerializer.legacySection();
|
||||
MiniMessage serializer = MiniMessage.miniMessage();
|
||||
return serializer.deserialize(set(player, serializer.serialize(component)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue