mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Optimize vanilla world generation*
*For single plot worlds Reuse base world data. Instead of taking several seconds, it should now take tens of milliseconds.
This commit is contained in:
@ -123,15 +123,16 @@ public class BukkitSetupUtils extends SetupUtils {
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
if (!PlotSquared.get().worlds.contains(worldPath)) {
|
||||
PlotSquared.get().worlds.createSection(worldPath);
|
||||
}
|
||||
ConfigurationSection worldSection =
|
||||
PlotSquared.get().worlds.getConfigurationSection(worldPath);
|
||||
for (ConfigurationNode step : steps) {
|
||||
worldSection.set(step.getConstant(), step.getValue());
|
||||
}
|
||||
if (!object.plotManager.endsWith(":single")) {
|
||||
if (!PlotSquared.get().worlds.contains(worldPath)) {
|
||||
PlotSquared.get().worlds.createSection(worldPath);
|
||||
}
|
||||
if (steps.length != 0) {
|
||||
ConfigurationSection worldSection = PlotSquared.get().worlds.getConfigurationSection(worldPath);
|
||||
for (ConfigurationNode step : steps) {
|
||||
worldSection.set(step.getConstant(), step.getValue());
|
||||
}
|
||||
}
|
||||
PlotSquared.get().worlds.set("worlds." + world + ".generator.type", object.type);
|
||||
PlotSquared.get().worlds.set("worlds." + world + ".generator.terrain", object.terrain);
|
||||
PlotSquared.get().worlds.set("worlds." + world + ".generator.plugin", object.plotManager);
|
||||
|
Reference in New Issue
Block a user