Fix gradient colors in chat - convert &#RRGGBB to MiniMessage <#RRGGBB> format
This commit is contained in:
parent
30d2c97e4f
commit
7b76f75e36
1 changed files with 3 additions and 3 deletions
|
|
@ -41,12 +41,12 @@ public final class ChatFormatter {
|
||||||
/* ===================== COLORS ===================== */
|
/* ===================== COLORS ===================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legacy-совместимость.
|
* Конвертирует &#RRGGBB формат в MiniMessage <#RRGGBB> формат
|
||||||
* Сейчас просто возвращает MiniMessage-ready строку.
|
|
||||||
*/
|
*/
|
||||||
public static String convertAllColors(String message) {
|
public static String convertAllColors(String message) {
|
||||||
if (message == null) return "";
|
if (message == null) return "";
|
||||||
return message;
|
// Конвертируем &#RRGGBB в <#RRGGBB> для MiniMessage
|
||||||
|
return message.replaceAll("&#([0-9a-fA-F]{6})", "<#$1>");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===================== EMOJIS ===================== */
|
/* ===================== EMOJIS ===================== */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue