mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-04-06 13:30:43 +08:00
Fix hex colors not working in chat (#6114)
Need to explicitly enable them in our LegacyComponentSerializer.
This commit is contained in:
parent
c7ff994d18
commit
f3a1b2b495
@ -22,6 +22,7 @@ public final class AdventureUtil {
|
||||
final LegacyComponentSerializer.Builder builder = LegacyComponentSerializer.builder()
|
||||
.flattener(ComponentFlattener.basic())
|
||||
.extractUrls(AbstractChatEvent.URL_PATTERN)
|
||||
.hexColors()
|
||||
.useUnusualXRepeatedCharacterHexFormat();
|
||||
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_16_1_R01)) {
|
||||
builder.hexColors();
|
||||
|
@ -27,7 +27,9 @@ public abstract class PaperChatListenerProvider implements Listener {
|
||||
this.serializer = LegacyComponentSerializer.builder()
|
||||
.flattener(ComponentFlattener.basic())
|
||||
.extractUrls(AbstractChatEvent.URL_PATTERN)
|
||||
.useUnusualXRepeatedCharacterHexFormat().build();
|
||||
.useUnusualXRepeatedCharacterHexFormat()
|
||||
.hexColors()
|
||||
.build();
|
||||
}
|
||||
|
||||
public void onChatLowest(final AbstractChatEvent event) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user