parent
8fe72383a1
commit
9e46739343
@ -48,7 +48,11 @@ public class CommandServer extends Command implements TabExecutor
|
||||
if ( server.canAccess( player ) )
|
||||
{
|
||||
TextComponent serverTextComponent = new TextComponent( first ? server.getName() : ", " + server.getName() );
|
||||
serverTextComponent.setHoverEvent( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( server.getPlayers().size() + " players" ).create() ) );
|
||||
int count = server.getPlayers().size();
|
||||
serverTextComponent.setHoverEvent( new HoverEvent( HoverEvent.Action.SHOW_TEXT,
|
||||
new ComponentBuilder( count + (count == 1 ? " player" : " players") + "\n")
|
||||
.append( "Click to connect to the server" ).italic( true )
|
||||
.create() ) );
|
||||
serverTextComponent.setClickEvent( new ClickEvent( ClickEvent.Action.RUN_COMMAND, "/server " + server.getName() ) );
|
||||
serverList.addExtra( serverTextComponent );
|
||||
first = false;
|
||||
|
Loading…
Reference in New Issue
Block a user