Code format.
This commit is contained in:
parent
3b71a2b570
commit
dc2da29c16
@ -85,7 +85,9 @@ public interface CommandSender
|
||||
|
||||
/**
|
||||
* Get all Permissions which this CommandSender has
|
||||
* @return a unmodifiable Collection of Strings which represent their permissions
|
||||
*
|
||||
* @return a unmodifiable Collection of Strings which represent their
|
||||
* permissions
|
||||
*/
|
||||
public Collection<String> getPermissions();
|
||||
}
|
||||
|
@ -47,7 +47,10 @@ public class TextComponent extends BaseComponent
|
||||
c += 32;
|
||||
}
|
||||
ChatColor format = ChatColor.getByChar( c );
|
||||
if ( format == null ) continue;
|
||||
if ( format == null )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ( builder.length() > 0 )
|
||||
{
|
||||
TextComponent old = component;
|
||||
@ -145,12 +148,13 @@ public class TextComponent extends BaseComponent
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a TextComponent with blank text and the extras set
|
||||
* to the passed array
|
||||
* Creates a TextComponent with blank text and the extras set to the passed
|
||||
* array
|
||||
*
|
||||
* @param extras the extras to set
|
||||
*/
|
||||
public TextComponent(BaseComponent ...extras) {
|
||||
public TextComponent(BaseComponent... extras)
|
||||
{
|
||||
setText( "" );
|
||||
setExtra( Arrays.asList( extras ) );
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ public class BaseComponentSerializer
|
||||
protected void serialize(JsonObject object, BaseComponent component, JsonSerializationContext context)
|
||||
{
|
||||
boolean first = false;
|
||||
if ( ComponentSerializer.serializedComponents.get() == null ) {
|
||||
if ( ComponentSerializer.serializedComponents.get() == null )
|
||||
{
|
||||
first = true;
|
||||
ComponentSerializer.serializedComponents.set( new HashSet<BaseComponent>() );
|
||||
}
|
||||
@ -131,7 +132,8 @@ public class BaseComponentSerializer
|
||||
} finally
|
||||
{
|
||||
ComponentSerializer.serializedComponents.get().remove( component );
|
||||
if (first) {
|
||||
if ( first )
|
||||
{
|
||||
ComponentSerializer.serializedComponents.set( null );
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,12 @@ package net.md_5.bungee.module.cmd.alert;
|
||||
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
public class PluginAlert extends Plugin {
|
||||
public class PluginAlert extends Plugin
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
public void onEnable()
|
||||
{
|
||||
getProxy().getPluginManager().registerCommand( this, new CommandAlert() );
|
||||
getProxy().getPluginManager().registerCommand( this, new CommandAlertRaw() );
|
||||
}
|
||||
|
@ -95,8 +95,14 @@ public class CommandSend extends Command implements TabExecutor
|
||||
matches.add( player.getName() );
|
||||
}
|
||||
}
|
||||
if ( "all".startsWith( search ) ) matches.add( "all" );
|
||||
if ( "current".startsWith( search ) ) matches.add( "current" );
|
||||
if ( "all".startsWith( search ) )
|
||||
{
|
||||
matches.add( "all" );
|
||||
}
|
||||
if ( "current".startsWith( search ) )
|
||||
{
|
||||
matches.add( "current" );
|
||||
}
|
||||
} else
|
||||
{
|
||||
String search = args[1].toLowerCase();
|
||||
|
@ -37,7 +37,6 @@ public enum Protocol
|
||||
HANDSHAKE
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
TO_SERVER.registerPacket( 0x00, Handshake.class );
|
||||
}
|
||||
@ -46,7 +45,6 @@ public enum Protocol
|
||||
GAME
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
TO_CLIENT.registerPacket( 0x00, KeepAlive.class );
|
||||
TO_CLIENT.registerPacket( 0x01, Login.class );
|
||||
@ -72,7 +70,6 @@ public enum Protocol
|
||||
STATUS
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
TO_CLIENT.registerPacket( 0x00, StatusResponse.class );
|
||||
TO_CLIENT.registerPacket( 0x01, PingPacket.class );
|
||||
@ -85,7 +82,6 @@ public enum Protocol
|
||||
LOGIN
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
TO_CLIENT.registerPacket( 0x00, Kick.class );
|
||||
TO_CLIENT.registerPacket( 0x01, EncryptionRequest.class );
|
||||
|
@ -5,7 +5,8 @@ import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.plugin.Command;
|
||||
|
||||
/**
|
||||
* Command to terminate the proxy instance. May only be used by the console by default.
|
||||
* Command to terminate the proxy instance. May only be used by the console by
|
||||
* default.
|
||||
*/
|
||||
public class CommandEnd extends Command
|
||||
{
|
||||
|
@ -13,7 +13,8 @@ public class LoginResult
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public static class Property {
|
||||
public static class Property
|
||||
{
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
|
Loading…
Reference in New Issue
Block a user