From e2bc7ed797c5e8d76d61339d0eb1f067521e5bb7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 26 Feb 2019 13:11:05 +1100 Subject: [PATCH] Misc formatting fixes --- .../java/net/md_5/bungee/api/event/ChatEvent.java | 3 ++- .../md_5/bungee/module/cmd/alert/CommandAlertRaw.java | 11 ++++++----- .../md_5/bungee/module/cmd/server/CommandServer.java | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java b/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java index 9b36b91e..828ede56 100644 --- a/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java +++ b/api/src/main/java/net/md_5/bungee/api/event/ChatEvent.java @@ -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() { diff --git a/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlertRaw.java b/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlertRaw.java index 24da97b6..4d4ef1be 100644 --- a/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlertRaw.java +++ b/module/cmd-alert/src/main/java/net/md_5/bungee/module/cmd/alert/CommandAlertRaw.java @@ -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() ); diff --git a/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java b/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java index ebf9a12d..794d571f 100644 --- a/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java +++ b/module/cmd-server/src/main/java/net/md_5/bungee/module/cmd/server/CommandServer.java @@ -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;