Reformat all code
This commit is contained in:
parent
5dfe83cf6d
commit
19c3c23b86
@ -33,7 +33,8 @@ public class ListenerInfo
|
|||||||
*/
|
*/
|
||||||
private final String defaultServer;
|
private final String defaultServer;
|
||||||
/**
|
/**
|
||||||
* Name of the server which users will be taken when current server goes down.
|
* Name of the server which users will be taken when current server goes
|
||||||
|
* down.
|
||||||
*/
|
*/
|
||||||
private final String fallbackServer;
|
private final String fallbackServer;
|
||||||
/**
|
/**
|
||||||
|
@ -45,6 +45,6 @@ public class PluginClassloader extends URLClassLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new ClassNotFoundException(name);
|
throw new ClassNotFoundException( name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,9 +150,9 @@ public class PluginManager
|
|||||||
|
|
||||||
private boolean enablePlugin(Map<Plugin, Boolean> pluginStatuses, Stack<Plugin> dependStack, Plugin plugin)
|
private boolean enablePlugin(Map<Plugin, Boolean> pluginStatuses, Stack<Plugin> dependStack, Plugin plugin)
|
||||||
{
|
{
|
||||||
if ( pluginStatuses.containsKey(plugin) )
|
if ( pluginStatuses.containsKey( plugin ) )
|
||||||
{
|
{
|
||||||
return pluginStatuses.get(plugin);
|
return pluginStatuses.get( plugin );
|
||||||
}
|
}
|
||||||
|
|
||||||
// success status
|
// success status
|
||||||
@ -161,18 +161,19 @@ public class PluginManager
|
|||||||
// try to load dependencies first
|
// try to load dependencies first
|
||||||
for ( String dependName : plugin.getDescription().getDepends() )
|
for ( String dependName : plugin.getDescription().getDepends() )
|
||||||
{
|
{
|
||||||
Plugin depend = this.plugins.get(dependName);
|
Plugin depend = this.plugins.get( dependName );
|
||||||
Boolean dependStatus = depend != null ? pluginStatuses.get(depend) : Boolean.FALSE;
|
Boolean dependStatus = depend != null ? pluginStatuses.get( depend ) : Boolean.FALSE;
|
||||||
|
|
||||||
if ( dependStatus == null ) {
|
if ( dependStatus == null )
|
||||||
if ( dependStack.contains(depend) )
|
{
|
||||||
|
if ( dependStack.contains( depend ) )
|
||||||
{
|
{
|
||||||
StringBuilder dependencyGraph = new StringBuilder();
|
StringBuilder dependencyGraph = new StringBuilder();
|
||||||
for ( Plugin element : dependStack )
|
for ( Plugin element : dependStack )
|
||||||
{
|
{
|
||||||
dependencyGraph.append(element.getDescription().getName()).append(" -> ");
|
dependencyGraph.append( element.getDescription().getName() ).append( " -> " );
|
||||||
}
|
}
|
||||||
dependencyGraph.append(plugin.getDescription().getName()).append(" -> ").append(dependName);
|
dependencyGraph.append( plugin.getDescription().getName() ).append( " -> " ).append( dependName );
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Circular dependency detected: " + dependencyGraph );
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Circular dependency detected: " + dependencyGraph );
|
||||||
status = false;
|
status = false;
|
||||||
} else
|
} else
|
||||||
@ -187,7 +188,7 @@ public class PluginManager
|
|||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} (required by {1}) is unavailable", new Object[]
|
ProxyServer.getInstance().getLogger().log( Level.WARNING, "{0} (required by {1}) is unavailable", new Object[]
|
||||||
{
|
{
|
||||||
depend.getDescription().getName(), plugin.getDescription().getName()
|
depend.getDescription().getName(), plugin.getDescription().getName()
|
||||||
} );
|
} );
|
||||||
status = false;
|
status = false;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public class BungeeServerInfo extends ServerInfo
|
|||||||
{
|
{
|
||||||
if ( future.isSuccess() )
|
if ( future.isSuccess() )
|
||||||
{
|
{
|
||||||
future.channel().pipeline().get( HandlerBoss.class ).setHandler( new PingHandler( BungeeServerInfo.this, callback ) );
|
future.channel().pipeline().get( HandlerBoss.class ).setHandler( new PingHandler( BungeeServerInfo.this, callback ) );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
callback.done( null, future.cause() );
|
callback.done( null, future.cause() );
|
||||||
|
@ -93,7 +93,7 @@ public final class UserConnection implements ProxiedPlayer
|
|||||||
{
|
{
|
||||||
Preconditions.checkArgument( name.length() <= 16, "Display name cannot be longer than 16 characters" );
|
Preconditions.checkArgument( name.length() <= 16, "Display name cannot be longer than 16 characters" );
|
||||||
bungee.getTabListHandler().onDisconnect( this );
|
bungee.getTabListHandler().onDisconnect( this );
|
||||||
displayName=name;
|
displayName = name;
|
||||||
bungee.getTabListHandler().onConnect( this );
|
bungee.getTabListHandler().onConnect( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
{
|
{
|
||||||
t = con.serverSentScoreboard.getTeam( team.name );
|
t = con.serverSentScoreboard.getTeam( team.name );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( t != null )
|
if ( t != null )
|
||||||
{
|
{
|
||||||
if ( team.mode == 0 || team.mode == 2 )
|
if ( team.mode == 0 || team.mode == 2 )
|
||||||
|
@ -175,16 +175,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
{
|
{
|
||||||
old.disconnect( "You are already connected to the server" );
|
old.disconnect( "You are already connected to the server" );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fire login event
|
// fire login event
|
||||||
LoginEvent event = new LoginEvent( InitialHandler.this );
|
LoginEvent event = new LoginEvent( InitialHandler.this );
|
||||||
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
|
||||||
{
|
{
|
||||||
disconnect( event.getCancelReason() );
|
disconnect( event.getCancelReason() );
|
||||||
}
|
}
|
||||||
|
|
||||||
Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, shared );
|
Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, shared );
|
||||||
Cipher decrypt = EncryptionUtil.getCipher( Cipher.DECRYPT_MODE, shared );
|
Cipher decrypt = EncryptionUtil.getCipher( Cipher.DECRYPT_MODE, shared );
|
||||||
ch.write( new PacketFCEncryptionResponse() );
|
ch.write( new PacketFCEncryptionResponse() );
|
||||||
|
@ -40,7 +40,7 @@ public class ServerUniqueTabList implements TabListHandler
|
|||||||
{
|
{
|
||||||
for ( String username : usernames )
|
for ( String username : usernames )
|
||||||
{
|
{
|
||||||
( (UserConnection) player ).sendPacket(new PacketC9PlayerListItem( username, false, 9999 ) );
|
( (UserConnection) player ).sendPacket( new PacketC9PlayerListItem( username, false, 9999 ) );
|
||||||
}
|
}
|
||||||
usernames.clear();
|
usernames.clear();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user