Possible fix for null PlotWorld

This commit is contained in:
boy0001 2015-05-09 14:11:24 +10:00
parent c9c669a8c2
commit 7d25cccf4a
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared</artifactId>
<version>2.10.5</version> <version>2.10.6</version>
<name>PlotSquared</name> <name>PlotSquared</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>

View File

@ -31,6 +31,7 @@ import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.generator.HybridPlotWorld;
import com.intellectualcrafters.plot.listeners.WorldEvents; import com.intellectualcrafters.plot.listeners.WorldEvents;
import com.intellectualcrafters.plot.util.ChunkManager; import com.intellectualcrafters.plot.util.ChunkManager;
@ -74,6 +75,10 @@ public abstract class PlotGenerator extends ChunkGenerator {
this.random.state = h; this.random.state = h;
this.result = new short[16][]; this.result = new short[16][];
PlotWorld plotworld = PlotSquared.getPlotWorld(world.getName()); 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); Biome biome = Biome.valueOf(plotworld.PLOT_BIOME);
this.X = cx << 4; this.X = cx << 4;
this.Z = cz << 4; this.Z = cz << 4;