#2560: Don't force gold on /server text

This commit is contained in:
md_5 2018-12-17 11:52:40 +11:00
parent afef0ec1fe
commit 12a99bd291

View File

@ -41,8 +41,7 @@ public class CommandServer extends Command implements TabExecutor
sender.sendMessage( ProxyServer.getInstance().getTranslation( "current_server", ( (ProxiedPlayer) sender ).getServer().getInfo().getName() ) );
}
TextComponent serverList = new TextComponent( ProxyServer.getInstance().getTranslation( "server_list" ) );
serverList.setColor( ChatColor.GOLD );
ComponentBuilder serverList = new ComponentBuilder( "" ).append( TextComponent.fromLegacyText( ProxyServer.getInstance().getTranslation( "server_list" ) ) );
boolean first = true;
for ( ServerInfo server : servers.values() )
{
@ -55,11 +54,11 @@ public class CommandServer extends Command implements TabExecutor
.append( "Click to connect to the server" ).italic( true )
.create() ) );
serverTextComponent.setClickEvent( new ClickEvent( ClickEvent.Action.RUN_COMMAND, "/server " + server.getName() ) );
serverList.addExtra( serverTextComponent );
serverList.append( serverTextComponent );
first = false;
}
}
sender.sendMessage( serverList );
sender.sendMessage( serverList.create() );
} else
{
if ( !( sender instanceof ProxiedPlayer ) )