mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 17:27:38 +00:00
Replaced tabs with spaces in .java files.
This commit is contained in:
parent
224bfef50c
commit
cbf58103e6
@ -41,9 +41,9 @@ public class CommandRegistration {
|
|||||||
Bukkit.getServer().getHelpMap().registerHelpTopicFactory(DynamicPluginCommand.class, new DynamicPluginCommandHelpTopic.Factory());
|
Bukkit.getServer().getHelpMap().registerHelpTopicFactory(DynamicPluginCommand.class, new DynamicPluginCommandHelpTopic.Factory());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final Plugin plugin;
|
protected final Plugin plugin;
|
||||||
protected final CommandExecutor executor;
|
protected final CommandExecutor executor;
|
||||||
private CommandMap fallbackCommands;
|
private CommandMap fallbackCommands;
|
||||||
|
|
||||||
public CommandRegistration(Plugin plugin) {
|
public CommandRegistration(Plugin plugin) {
|
||||||
this(plugin, plugin);
|
this(plugin, plugin);
|
||||||
|
@ -30,7 +30,7 @@ public class ForgeServerInterface extends ServerInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int resolveItem(String name) {
|
public int resolveItem(String name) {
|
||||||
if (name == null) return 0;
|
if (name == null) return 0;
|
||||||
for (Item item : Item.itemsList) {
|
for (Item item : Item.itemsList) {
|
||||||
if (item == null) continue;
|
if (item == null) continue;
|
||||||
if (item.getUnlocalizedName() == null) continue;
|
if (item.getUnlocalizedName() == null) continue;
|
||||||
|
@ -24,38 +24,38 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
public class SimpleInjector implements Injector {
|
public class SimpleInjector implements Injector {
|
||||||
private static final Logger logger = Logger.getLogger(SimpleInjector.class.getCanonicalName());
|
private static final Logger logger = Logger.getLogger(SimpleInjector.class.getCanonicalName());
|
||||||
private Object[] args;
|
private Object[] args;
|
||||||
private Class<?>[] argClasses;
|
private Class<?>[] argClasses;
|
||||||
|
|
||||||
public SimpleInjector(Object... args) {
|
public SimpleInjector(Object... args) {
|
||||||
this.args = args;
|
this.args = args;
|
||||||
argClasses = new Class[args.length];
|
argClasses = new Class[args.length];
|
||||||
for (int i = 0; i < args.length; ++i) {
|
for (int i = 0; i < args.length; ++i) {
|
||||||
argClasses[i] = args[i].getClass();
|
argClasses[i] = args[i].getClass();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getInstance(Class<?> clazz) {
|
public Object getInstance(Class<?> clazz) {
|
||||||
try {
|
try {
|
||||||
Constructor<?> ctr = clazz.getConstructor(argClasses);
|
Constructor<?> ctr = clazz.getConstructor(argClasses);
|
||||||
ctr.setAccessible(true);
|
ctr.setAccessible(true);
|
||||||
return ctr.newInstance(args);
|
return ctr.newInstance(args);
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
logger.severe("Error initializing commands class " + clazz + ": ");
|
logger.severe("Error initializing commands class " + clazz + ": ");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
logger.severe("Error initializing commands class " + clazz + ": ");
|
logger.severe("Error initializing commands class " + clazz + ": ");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
} catch (InstantiationException e) {
|
} catch (InstantiationException e) {
|
||||||
logger.severe("Error initializing commands class " + clazz + ": ");
|
logger.severe("Error initializing commands class " + clazz + ": ");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
logger.severe("Error initializing commands class " + clazz + ": ");
|
logger.severe("Error initializing commands class " + clazz + ": ");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,11 +53,11 @@ import com.sk89q.worldedit.command.tool.brush.SphereBrush;
|
|||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public class BrushCommands {
|
public class BrushCommands {
|
||||||
private final WorldEdit we;
|
private final WorldEdit we;
|
||||||
|
|
||||||
public BrushCommands(WorldEdit we) {
|
public BrushCommands(WorldEdit we) {
|
||||||
this.we = we;
|
this.we = we;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = { "sphere", "s" },
|
aliases = { "sphere", "s" },
|
||||||
|
Loading…
Reference in New Issue
Block a user