mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +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 =
|
||||
this.worlds.getConfigurationSection("worlds." + world);
|
||||
plotworld.saveConfiguration(section);
|
||||
plotworld.loadConfiguration(section);
|
||||
plotworld.loadDefaultConfiguration(section);
|
||||
this.worlds.save(this.worldsFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -36,8 +36,8 @@ public class SinglePlotArea extends GridPlotWorld {
|
||||
SetupObject setup = new SetupObject();
|
||||
setup.plotManager = "PlotSquared:single";
|
||||
setup.setupGenerator = "PlotSquared:single";
|
||||
setup.type = 0;
|
||||
setup.terrain = 0;
|
||||
setup.type = TYPE;
|
||||
setup.terrain = TERRAIN;
|
||||
setup.step = new ConfigurationNode[0];
|
||||
setup.world = worldName;
|
||||
SetupUtils.manager.setupWorld(setup);
|
||||
|
@ -69,13 +69,10 @@ public class SinglePlotAreaManager extends DefaultPlotAreaManager {
|
||||
}
|
||||
|
||||
@Override public PlotArea getApplicablePlotArea(Location location) {
|
||||
PlotArea found = super.getApplicablePlotArea(location);
|
||||
if (found != null)
|
||||
return found;
|
||||
String world = location.getWorld();
|
||||
return isWorld(world) || world.equals("*") || super.getAllPlotAreas().length == 0 ?
|
||||
area :
|
||||
null;
|
||||
super.getApplicablePlotArea(location);
|
||||
}
|
||||
|
||||
@Override public PlotArea getPlotArea(String world, String id) {
|
||||
|
Loading…
Reference in New Issue
Block a user