mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Allow single plot areas to load survival worlds
This commit is contained in:
parent
59f89980a3
commit
0fdc5eafbd
@ -1390,7 +1390,7 @@ import java.util.zip.ZipInputStream;
|
|||||||
ConfigurationSection section =
|
ConfigurationSection section =
|
||||||
this.worlds.getConfigurationSection("worlds." + world);
|
this.worlds.getConfigurationSection("worlds." + world);
|
||||||
plotworld.saveConfiguration(section);
|
plotworld.saveConfiguration(section);
|
||||||
plotworld.loadConfiguration(section);
|
plotworld.loadDefaultConfiguration(section);
|
||||||
this.worlds.save(this.worldsFile);
|
this.worlds.save(this.worldsFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -36,8 +36,8 @@ public class SinglePlotArea extends GridPlotWorld {
|
|||||||
SetupObject setup = new SetupObject();
|
SetupObject setup = new SetupObject();
|
||||||
setup.plotManager = "PlotSquared:single";
|
setup.plotManager = "PlotSquared:single";
|
||||||
setup.setupGenerator = "PlotSquared:single";
|
setup.setupGenerator = "PlotSquared:single";
|
||||||
setup.type = 0;
|
setup.type = TYPE;
|
||||||
setup.terrain = 0;
|
setup.terrain = TERRAIN;
|
||||||
setup.step = new ConfigurationNode[0];
|
setup.step = new ConfigurationNode[0];
|
||||||
setup.world = worldName;
|
setup.world = worldName;
|
||||||
SetupUtils.manager.setupWorld(setup);
|
SetupUtils.manager.setupWorld(setup);
|
||||||
|
@ -69,13 +69,10 @@ public class SinglePlotAreaManager extends DefaultPlotAreaManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotArea getApplicablePlotArea(Location location) {
|
@Override public PlotArea getApplicablePlotArea(Location location) {
|
||||||
PlotArea found = super.getApplicablePlotArea(location);
|
|
||||||
if (found != null)
|
|
||||||
return found;
|
|
||||||
String world = location.getWorld();
|
String world = location.getWorld();
|
||||||
return isWorld(world) || world.equals("*") || super.getAllPlotAreas().length == 0 ?
|
return isWorld(world) || world.equals("*") || super.getAllPlotAreas().length == 0 ?
|
||||||
area :
|
area :
|
||||||
null;
|
super.getApplicablePlotArea(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public PlotArea getPlotArea(String world, String id) {
|
@Override public PlotArea getPlotArea(String world, String id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user