Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +01:00
Replaced tabs with spaces in .java files.
Dieser Commit ist enthalten in:
Ursprung
224bfef50c
Commit
cbf58103e6
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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" },
|
||||
|
@ -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();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren