Fixed a heckload of warnings

This commit is contained in:
Sauilitired 2014-11-09 12:51:17 +01:00
parent 87a0cecb2f
commit 182f4cbd22
17 changed files with 153 additions and 163 deletions

View file

@ -38,34 +38,14 @@ import java.util.HashMap;
import java.util.Map;
/**
* Created by Citymonstret on 2014-09-26.
* Created 2014-09-26 for PlotSquared
*
* @author Citymonstret, Empire92
*/
public class Setup extends SubCommand implements Listener {
public static Map<String, SetupObject> setupMap = new HashMap<>();
private class SetupObject {
String world;
String plugin;
int current = 0;
ConfigurationNode[] step;
public SetupObject(final String world, final PlotWorld plotworld, final String plugin) {
this.world = world;
this.step = plotworld.getSettingNodes();
this.plugin = plugin;
}
public int getCurrent() {
return this.current;
}
public int getMax() {
return this.step.length;
}
}
public Setup() {
super("setup", "plots.admin", "Setup a PlotWorld", "setup {world} {generator}", "setup", CommandCategory.ACTIONS, false);
}
@ -109,7 +89,9 @@ public class Setup extends SubCommand implements Listener {
final ChunkGenerator generator = plugin.getDefaultWorldGenerator(world, "");
final World myworld = WorldCreator.name(world).generator(generator).createWorld();
PlayerFunctions.sendMessage(plr, "&aLoaded world.");
plr.teleport(myworld.getSpawnLocation());
if (plr != null) {
plr.teleport(myworld.getSpawnLocation());
}
break;
}
}
@ -183,7 +165,7 @@ public class Setup extends SubCommand implements Listener {
return true;
}
final ArrayList<String> generators = new ArrayList<String>();
final ArrayList<String> generators = new ArrayList<>();
ChunkGenerator generator = null;
@ -220,4 +202,26 @@ public class Setup extends SubCommand implements Listener {
}
}
private class SetupObject {
String world;
String plugin;
int current = 0;
ConfigurationNode[] step;
public SetupObject(final String world, final PlotWorld plotworld, final String plugin) {
this.world = world;
this.step = plotworld.getSettingNodes();
this.plugin = plugin;
}
public int getCurrent() {
return this.current;
}
public int getMax() {
return this.step.length;
}
}
}