#3318: Fixed system messages shown in action bar for MC 1.19 clients

This commit is contained in:
Lukas Alt 2022-06-08 03:23:41 +02:00 committed by GitHub
parent 8c0e4b1d33
commit 5972fd2353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,7 +479,7 @@ public final class UserConnection implements ProxiedPlayer
{ {
if ( getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_19 ) if ( getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_19 )
{ {
unsafe().sendPacket( new SystemChat( message, position.ordinal() ) ); unsafe().sendPacket( new SystemChat( message, position.ordinal() - 1 ) ); // For system messages, the CHAT position is not supported.
} else } else
{ {
unsafe().sendPacket( new Chat( message, (byte) position.ordinal(), sender ) ); unsafe().sendPacket( new Chat( message, (byte) position.ordinal(), sender ) );