Misc formatting fixes
This commit is contained in:
parent
9133a6f511
commit
e2bc7ed797
@ -47,7 +47,8 @@ public class ChatEvent extends TargetedEvent implements Cancellable
|
||||
* Checks whether this message is run on this proxy server.
|
||||
*
|
||||
* @return if this command runs on the proxy
|
||||
* @see PluginManager#isExecutableCommand(java.lang.String, net.md_5.bungee.api.CommandSender)
|
||||
* @see PluginManager#isExecutableCommand(java.lang.String,
|
||||
* net.md_5.bungee.api.CommandSender)
|
||||
*/
|
||||
public boolean isProxyCommand()
|
||||
{
|
||||
|
@ -40,11 +40,12 @@ public class CommandAlertRaw extends Command
|
||||
}
|
||||
if ( sender instanceof ProxiedPlayer )
|
||||
{
|
||||
sender.sendMessage(
|
||||
new ComponentBuilder( "An error occurred while parsing your message. (Hover for details)" ).
|
||||
color( ChatColor.RED ).underlined( true ).
|
||||
event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( error.getMessage() ).color( ChatColor.RED ).create() ) ).
|
||||
create() );
|
||||
sender.sendMessage( new ComponentBuilder( "An error occurred while parsing your message. (Hover for details)" )
|
||||
.color( ChatColor.RED )
|
||||
.underlined( true )
|
||||
.event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( error.getMessage() ).color( ChatColor.RED ).create() ) )
|
||||
.create()
|
||||
);
|
||||
} else
|
||||
{
|
||||
sender.sendMessage( new ComponentBuilder( "An error occurred while parsing your message: " ).color( ChatColor.RED ).append( error.getMessage() ).create() );
|
||||
|
@ -49,10 +49,10 @@ public class CommandServer extends Command implements TabExecutor
|
||||
{
|
||||
TextComponent serverTextComponent = new TextComponent( first ? server.getName() : ", " + server.getName() );
|
||||
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.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.append( serverTextComponent );
|
||||
first = false;
|
||||
|
Loading…
Reference in New Issue
Block a user