Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
+31 -28
View File
@@ -18,22 +18,40 @@
package appeng.server;
import com.google.common.base.Joiner;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.server.MinecraftServer;
import com.google.common.base.Joiner;
public class AECommand extends CommandBase
{
final MinecraftServer srv;
public AECommand(MinecraftServer server) {
public AECommand( MinecraftServer server )
{
this.srv = server;
}
@Override
public int getRequiredPermissionLevel()
{
return 0;
}
/**
* wtf?
*/
@Override
public int compareTo( Object arg0 )
{
return 1;
}
@Override
public String getCommandName()
{
@@ -41,44 +59,38 @@ public class AECommand extends CommandBase
}
@Override
public String getCommandUsage(ICommandSender icommandsender)
public String getCommandUsage( ICommandSender icommandsender )
{
return "commands.ae2.usage";
}
@Override
public int getRequiredPermissionLevel()
public void processCommand( ICommandSender sender, String[] args )
{
return 0;
}
@Override
public void processCommand(ICommandSender sender, String[] args)
{
if ( args.length == 0 )
if( args.length == 0 )
{
throw new WrongUsageException( "commands.ae2.usage" );
}
else if ( "help".equals( args[0] ) )
else if( "help".equals( args[0] ) )
{
try
{
if ( args.length > 1 )
if( args.length > 1 )
{
Commands c = Commands.valueOf( args[1] );
throw new WrongUsageException( c.command.getHelp( this.srv ) );
}
}
catch ( WrongUsageException wrong )
catch( WrongUsageException wrong )
{
throw wrong;
}
catch (Throwable er)
catch( Throwable er )
{
throw new WrongUsageException( "commands.ae2.usage" );
}
}
else if ( "list".equals( args[0] ) )
else if( "list".equals( args[0] ) )
{
throw new WrongUsageException( Joiner.on( ", " ).join( Commands.values() ) );
}
@@ -87,28 +99,19 @@ public class AECommand extends CommandBase
try
{
Commands c = Commands.valueOf( args[0] );
if ( sender.canCommandSenderUseCommand( c.level, this.getCommandName() ) )
if( sender.canCommandSenderUseCommand( c.level, this.getCommandName() ) )
c.command.call( this.srv, args, sender );
else
throw new WrongUsageException( "commands.ae2.permissions" );
}
catch ( WrongUsageException wrong )
catch( WrongUsageException wrong )
{
throw wrong;
}
catch (Throwable er)
catch( Throwable er )
{
throw new WrongUsageException( "commands.ae2.usage" );
}
}
}
/**
* wtf?
*/
@Override
public int compareTo(Object arg0)
{
return 1;
}
}