mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
plot setup.
This commit is contained in:
parent
a4afba181c
commit
8e03638d8d
@ -6,7 +6,7 @@
|
||||
<groupId>com.intellectualcrafters</groupId>
|
||||
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.4.2</version>
|
||||
<version>2.4.3</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -941,10 +941,13 @@ import java.util.concurrent.TimeUnit;
|
||||
plotGenerator = (PlotGenerator) generator;
|
||||
plotWorld = plotGenerator.getNewPlotWorld(world);
|
||||
plotManager = plotGenerator.getPlotManager();
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&aDetected world load for '" + world + "'");
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - generator: &7" + plotGenerator.getClass().getName());
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - plotworld: &7" + plotWorld.getClass().getName());
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - manager: &7" + plotManager.getClass().getName());
|
||||
|
||||
if (!world.equals("CheckingPlotSquaredGenerator")) {
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&aDetected world load for '" + world + "'");
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - generator: &7" + plotGenerator.getClass().getName());
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - plotworld: &7" + plotWorld.getClass().getName());
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "&3 - manager: &7" + plotManager.getClass().getName());
|
||||
}
|
||||
|
||||
if (!config.contains(path)) {
|
||||
config.createSection(path);
|
||||
|
@ -77,8 +77,7 @@ public class Setup extends SubCommand implements Listener {
|
||||
}
|
||||
try {
|
||||
PlotMain.config.save(PlotMain.configFile);
|
||||
PlotMain.config.load(PlotMain.configFile);
|
||||
} catch (final IOException | InvalidConfigurationException e) {
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -125,11 +124,10 @@ public class Setup extends SubCommand implements Listener {
|
||||
} else {
|
||||
if (args[0].equalsIgnoreCase("cancel")) {
|
||||
final String world = object.world;
|
||||
PlotMain.config.set(world, null);
|
||||
PlotMain.config.set("worlds." + world, null);
|
||||
try {
|
||||
PlotMain.config.save(PlotMain.configFile);
|
||||
PlotMain.config.load(PlotMain.configFile);
|
||||
} catch (final IOException | InvalidConfigurationException e) {
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
setupMap.remove(plrname);
|
||||
@ -191,7 +189,8 @@ public class Setup extends SubCommand implements Listener {
|
||||
|
||||
for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
if (plugin.isEnabled()) {
|
||||
if (plugin.getDefaultWorldGenerator(world, "") != null) {
|
||||
if (plugin.getDefaultWorldGenerator("CheckingPlotSquaredGenerator", "") != null) {
|
||||
PlotMain.removePlotWorld(world);
|
||||
final String name = plugin.getDescription().getName();
|
||||
generators.add(name);
|
||||
if (args[1].equals(name)) {
|
||||
@ -201,6 +200,12 @@ public class Setup extends SubCommand implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
PlotMain.config.set("worlds.CheckingPlotSquaredGenerator", null);
|
||||
try {
|
||||
PlotMain.config.save(PlotMain.configFile);
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (generator == null) {
|
||||
sendMessage(plr, C.SETUP_INVALID_GENERATOR, StringUtils.join(generators, C.BLOCK_LIST_SEPARATER.s()));
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user