Replaced tabs with spaces in .java files.

This commit is contained in:
sk89q 2014-04-04 14:11:48 -07:00
parent 224bfef50c
commit cbf58103e6
5 changed files with 32 additions and 32 deletions

View File

@ -41,9 +41,9 @@ public class CommandRegistration {
Bukkit.getServer().getHelpMap().registerHelpTopicFactory(DynamicPluginCommand.class, new DynamicPluginCommandHelpTopic.Factory());
}
protected final Plugin plugin;
protected final Plugin plugin;
protected final CommandExecutor executor;
private CommandMap fallbackCommands;
private CommandMap fallbackCommands;
public CommandRegistration(Plugin plugin) {
this(plugin, plugin);

View File

@ -30,7 +30,7 @@ public class ForgeServerInterface extends ServerInterface {
}
public int resolveItem(String name) {
if (name == null) return 0;
if (name == null) return 0;
for (Item item : Item.itemsList) {
if (item == null) continue;
if (item.getUnlocalizedName() == null) continue;

View File

@ -24,38 +24,38 @@ import java.util.logging.Logger;
public class SimpleInjector implements Injector {
private static final Logger logger = Logger.getLogger(SimpleInjector.class.getCanonicalName());
private Object[] args;
private Class<?>[] argClasses;
private Object[] args;
private Class<?>[] argClasses;
public SimpleInjector(Object... args) {
this.args = args;
argClasses = new Class[args.length];
for (int i = 0; i < args.length; ++i) {
argClasses[i] = args[i].getClass();
}
}
public SimpleInjector(Object... args) {
this.args = args;
argClasses = new Class[args.length];
for (int i = 0; i < args.length; ++i) {
argClasses[i] = args[i].getClass();
}
}
public Object getInstance(Class<?> clazz) {
try {
Constructor<?> ctr = clazz.getConstructor(argClasses);
public Object getInstance(Class<?> clazz) {
try {
Constructor<?> ctr = clazz.getConstructor(argClasses);
ctr.setAccessible(true);
return ctr.newInstance(args);
} catch (NoSuchMethodException e) {
return ctr.newInstance(args);
} catch (NoSuchMethodException e) {
logger.severe("Error initializing commands class " + clazz + ": ");
e.printStackTrace();
return null;
} catch (InvocationTargetException e) {
return null;
} catch (InvocationTargetException e) {
logger.severe("Error initializing commands class " + clazz + ": ");
e.printStackTrace();
return null;
} catch (InstantiationException e) {
return null;
} catch (InstantiationException e) {
logger.severe("Error initializing commands class " + clazz + ": ");
e.printStackTrace();
return null;
} catch (IllegalAccessException e) {
return null;
} catch (IllegalAccessException e) {
logger.severe("Error initializing commands class " + clazz + ": ");
e.printStackTrace();
return null;
}
}
return null;
}
}
}

View File

@ -53,11 +53,11 @@ import com.sk89q.worldedit.command.tool.brush.SphereBrush;
* @author sk89q
*/
public class BrushCommands {
private final WorldEdit we;
public BrushCommands(WorldEdit we) {
this.we = we;
}
private final WorldEdit we;
public BrushCommands(WorldEdit we) {
this.we = we;
}
@Command(
aliases = { "sphere", "s" },

View File

@ -594,7 +594,7 @@ public class SelectionCommands {
@CommandPermissions("worldedit.selection.size")
public void size(CommandContext args, LocalSession session, LocalPlayer player,
EditSession editSession) throws WorldEditException {
if (args.hasFlag('c')) {
CuboidClipboard clipboard = session.getClipboard();
Vector size = clipboard.getSize();