From 7d25cccf4af5a0f3096f6fca9e9332a3814459d2 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 9 May 2015 14:11:24 +1000 Subject: [PATCH] Possible fix for null PlotWorld --- PlotSquared/pom.xml | 2 +- .../com/intellectualcrafters/plot/object/PlotGenerator.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml index ac58fd935..73e00de9e 100644 --- a/PlotSquared/pom.xml +++ b/PlotSquared/pom.xml @@ -8,7 +8,7 @@ UTF-8 PlotSquared - 2.10.5 + 2.10.6 PlotSquared jar diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java index d1281e294..411aeeabd 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/object/PlotGenerator.java @@ -31,6 +31,7 @@ import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; import com.intellectualcrafters.plot.PlotSquared; +import com.intellectualcrafters.plot.generator.HybridPlotWorld; import com.intellectualcrafters.plot.listeners.WorldEvents; import com.intellectualcrafters.plot.util.ChunkManager; @@ -74,6 +75,10 @@ public abstract class PlotGenerator extends ChunkGenerator { this.random.state = h; this.result = new short[16][]; PlotWorld plotworld = PlotSquared.getPlotWorld(world.getName()); + if (plotworld == null) { + plotworld = getNewPlotWorld(world.getName()); + PlotSquared.addPlotWorld(world.getName(), plotworld, getPlotManager()); + } Biome biome = Biome.valueOf(plotworld.PLOT_BIOME); this.X = cx << 4; this.Z = cz << 4;