#2560: Don't force gold on /server text
This commit is contained in:
parent
afef0ec1fe
commit
12a99bd291
@ -41,8 +41,7 @@ public class CommandServer extends Command implements TabExecutor
|
|||||||
sender.sendMessage( ProxyServer.getInstance().getTranslation( "current_server", ( (ProxiedPlayer) sender ).getServer().getInfo().getName() ) );
|
sender.sendMessage( ProxyServer.getInstance().getTranslation( "current_server", ( (ProxiedPlayer) sender ).getServer().getInfo().getName() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
TextComponent serverList = new TextComponent( ProxyServer.getInstance().getTranslation( "server_list" ) );
|
ComponentBuilder serverList = new ComponentBuilder( "" ).append( TextComponent.fromLegacyText( ProxyServer.getInstance().getTranslation( "server_list" ) ) );
|
||||||
serverList.setColor( ChatColor.GOLD );
|
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for ( ServerInfo server : servers.values() )
|
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 )
|
.append( "Click to connect to the server" ).italic( true )
|
||||||
.create() ) );
|
.create() ) );
|
||||||
serverTextComponent.setClickEvent( new ClickEvent( ClickEvent.Action.RUN_COMMAND, "/server " + server.getName() ) );
|
serverTextComponent.setClickEvent( new ClickEvent( ClickEvent.Action.RUN_COMMAND, "/server " + server.getName() ) );
|
||||||
serverList.addExtra( serverTextComponent );
|
serverList.append( serverTextComponent );
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sender.sendMessage( serverList );
|
sender.sendMessage( serverList.create() );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if ( !( sender instanceof ProxiedPlayer ) )
|
if ( !( sender instanceof ProxiedPlayer ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user