Revert broken chat PR and align with Spigot

This commit is contained in:
md_5 2022-06-08 19:37:15 +10:00
parent e46bc343e4
commit ff5727c5ef
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -479,7 +479,13 @@ public final class UserConnection implements ProxiedPlayer
{
if ( getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_19 )
{
unsafe().sendPacket( new SystemChat( message, position.ordinal() - 1 ) ); // For system messages, the CHAT position is not supported.
// Align with Spigot and remove client side formatting for now
if ( position == ChatMessageType.CHAT )
{
position = ChatMessageType.SYSTEM;
}
unsafe().sendPacket( new SystemChat( message, position.ordinal() ) );
} else
{
unsafe().sendPacket( new Chat( message, (byte) position.ordinal(), sender ) );