Reformat all code

This commit is contained in:
md_5 2013-04-11 20:26:55 +10:00
parent 5dfe83cf6d
commit 19c3c23b86
8 changed files with 20 additions and 18 deletions

View File

@ -33,7 +33,8 @@ public class ListenerInfo
*/
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;
/**

View File

@ -45,6 +45,6 @@ public class PluginClassloader extends URLClassLoader
}
}
}
throw new ClassNotFoundException(name);
throw new ClassNotFoundException( name );
}
}

View File

@ -150,9 +150,9 @@ public class PluginManager
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
@ -161,18 +161,19 @@ public class PluginManager
// try to load dependencies first
for ( String dependName : plugin.getDescription().getDepends() )
{
Plugin depend = this.plugins.get(dependName);
Boolean dependStatus = depend != null ? pluginStatuses.get(depend) : Boolean.FALSE;
Plugin depend = this.plugins.get( dependName );
Boolean dependStatus = depend != null ? pluginStatuses.get( depend ) : Boolean.FALSE;
if ( dependStatus == null ) {
if ( dependStack.contains(depend) )
if ( dependStatus == null )
{
if ( dependStack.contains( depend ) )
{
StringBuilder dependencyGraph = new StringBuilder();
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 );
status = false;
} else
@ -187,7 +188,7 @@ public class PluginManager
{
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;
}

View File

@ -61,7 +61,7 @@ public class BungeeServerInfo extends ServerInfo
{
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
{
callback.done( null, future.cause() );

View File

@ -93,7 +93,7 @@ public final class UserConnection implements ProxiedPlayer
{
Preconditions.checkArgument( name.length() <= 16, "Display name cannot be longer than 16 characters" );
bungee.getTabListHandler().onDisconnect( this );
displayName=name;
displayName = name;
bungee.getTabListHandler().onConnect( this );
}

View File

@ -40,7 +40,7 @@ public class ServerUniqueTabList implements TabListHandler
{
for ( String username : usernames )
{
( (UserConnection) player ).sendPacket(new PacketC9PlayerListItem( username, false, 9999 ) );
( (UserConnection) player ).sendPacket( new PacketC9PlayerListItem( username, false, 9999 ) );
}
usernames.clear();
}