mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 06:23:14 +00:00
Fixed a heckload of warnings
This commit is contained in:
parent
87a0cecb2f
commit
182f4cbd22
17 changed files with 153 additions and 163 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue