diff --git a/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotPopulator.java b/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotPopulator.java index dd8432dc3..0ed26f697 100644 --- a/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotPopulator.java +++ b/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotPopulator.java @@ -26,38 +26,43 @@ public abstract class BukkitPlotPopulator extends BlockPopulator { @Override public void populate(final World world, final Random rand, final Chunk chunk) { - this.world = world; - worldname = world.getName(); - X = chunk.getX() << 4; - Z = chunk.getZ() << 4; - if (ChunkManager.FORCE_PASTE) { - for (short x = 0; x < 16; x++) { - for (short z = 0; z < 16; z++) { - final PlotLoc loc = new PlotLoc((short) (X + x), (short) (Z + z)); - final HashMap blocks = ChunkManager.GENERATE_DATA.get(loc); - for (final Entry entry : blocks.entrySet()) { - setBlock(x, entry.getKey(), z, entry.getValue()); + try { + this.world = world; + worldname = world.getName(); + X = chunk.getX() << 4; + Z = chunk.getZ() << 4; + if (ChunkManager.FORCE_PASTE) { + for (short x = 0; x < 16; x++) { + for (short z = 0; z < 16; z++) { + final PlotLoc loc = new PlotLoc((short) (X + x), (short) (Z + z)); + final HashMap blocks = ChunkManager.GENERATE_DATA.get(loc); + for (final Entry entry : blocks.entrySet()) { + setBlock(x, entry.getKey(), z, entry.getValue()); + } } } + return; } - return; - } - populate(world, ChunkManager.CURRENT_PLOT_CLEAR, random, X, Z); - if (ChunkManager.CURRENT_PLOT_CLEAR != null) { - PlotLoc loc; - for (final Entry> entry : ChunkManager.GENERATE_DATA.entrySet()) { - for (final Entry entry2 : entry.getValue().entrySet()) { - loc = entry.getKey(); - final int xx = loc.x - X; - final int zz = loc.z - Z; - if ((xx >= 0) && (xx < 16)) { - if ((zz >= 0) && (zz < 16)) { - setBlock(xx, entry2.getKey(), zz, entry2.getValue()); + populate(world, ChunkManager.CURRENT_PLOT_CLEAR, random, X, Z); + if (ChunkManager.CURRENT_PLOT_CLEAR != null) { + PlotLoc loc; + for (final Entry> entry : ChunkManager.GENERATE_DATA.entrySet()) { + for (final Entry entry2 : entry.getValue().entrySet()) { + loc = entry.getKey(); + final int xx = loc.x - X; + final int zz = loc.z - Z; + if ((xx >= 0) && (xx < 16)) { + if ((zz >= 0) && (zz < 16)) { + setBlock(xx, entry2.getKey(), zz, entry2.getValue()); + } } } } } } + catch (Exception e) { + e.printStackTrace(); + } } public abstract void populate(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz); diff --git a/target/PlotSquared-Bukkit.jar b/target/PlotSquared-Bukkit.jar index 586e15374..4dc3930ed 100644 Binary files a/target/PlotSquared-Bukkit.jar and b/target/PlotSquared-Bukkit.jar differ diff --git a/target/PlotSquared-Sponge.jar b/target/PlotSquared-Sponge.jar index bb7a9ca4b..2dbe27c4f 100644 Binary files a/target/PlotSquared-Sponge.jar and b/target/PlotSquared-Sponge.jar differ