Fix GUI colors and TAB placeholder format - applyGradient uses &#RRGGBB for GUI (LegacyComponentSerializer) - Added applyGradientTabFormat for TAB plugin (§x§R§R§G§G§B§B) - PlaceholderAPIHook now uses TAB format for %lochat_full% - Updated tests to match new formats
This commit is contained in:
parent
036382b71a
commit
29ae373554
5 changed files with 127 additions and 26 deletions
|
|
@ -69,6 +69,7 @@ public class PlaceholderAPIHook extends PlaceholderExpansion {
|
|||
}
|
||||
|
||||
// Gradient placeholders (совместимость с LoPreff)
|
||||
// Используем TAB формат §x§R§R§G§G§B§B для совместимости с TAB плагином
|
||||
case "gradient_full", "full" -> {
|
||||
Player onlinePlayer = player.getPlayer();
|
||||
if (onlinePlayer == null) yield player.getName() != null ? player.getName() : "";
|
||||
|
|
@ -78,7 +79,8 @@ public class PlaceholderAPIHook extends PlaceholderExpansion {
|
|||
yield player.getName() != null ? player.getName() : "";
|
||||
}
|
||||
|
||||
yield gradient.getFormattedName(onlinePlayer);
|
||||
// Используем TAB формат для плейсхолдеров
|
||||
yield gradient.getFormattedNameForTab(onlinePlayer);
|
||||
}
|
||||
case "gradient_name", "name" -> {
|
||||
Player onlinePlayer = player.getPlayer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue