#2829: Fix action bar messages on pre 1.11 versions

This commit is contained in:
_tomcraft 2020-04-30 00:11:00 +02:00 committed by GitHub
parent a1969b2fe6
commit 855d152503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,7 +456,7 @@ public final class UserConnection implements ProxiedPlayer
{ {
// Versions older than 1.11 cannot send the Action bar with the new JSON formattings // Versions older than 1.11 cannot send the Action bar with the new JSON formattings
// Fix by converting to a legacy message, see https://bugs.mojang.com/browse/MC-119145 // Fix by converting to a legacy message, see https://bugs.mojang.com/browse/MC-119145
if ( ProxyServer.getInstance().getProtocolVersion() <= ProtocolConstants.MINECRAFT_1_10 ) if ( getPendingConnection().getVersion() <= ProtocolConstants.MINECRAFT_1_10 )
{ {
sendMessage( position, ComponentSerializer.toString( new TextComponent( BaseComponent.toLegacyText( message ) ) ) ); sendMessage( position, ComponentSerializer.toString( new TextComponent( BaseComponent.toLegacyText( message ) ) ) );
} else } else