diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java index 470e75d3b..c9ca0e064 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java @@ -272,6 +272,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { try { BukkitSetBlockManager.setBlockManager = new SetBlockFast(); } catch (final Throwable e) { + MainUtil.canSetFast = false; BukkitSetBlockManager.setBlockManager = new SetBlockSlow(); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/AugmentedPopulator.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/AugmentedPopulator.java index b43c12f79..b050e8a7b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/AugmentedPopulator.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/generator/AugmentedPopulator.java @@ -19,7 +19,9 @@ import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotManager; import com.intellectualcrafters.plot.object.PlotWorld; import com.intellectualcrafters.plot.object.RegionWrapper; +import com.intellectualcrafters.plot.util.BlockUpdateUtil; import com.intellectualcrafters.plot.util.ChunkManager; +import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.bukkit.BukkitChunkManager; import com.intellectualcrafters.plot.util.bukkit.BukkitSetBlockManager; @@ -187,7 +189,11 @@ public class AugmentedPopulator extends BlockPopulator { } } for (final BlockPopulator populator : this.generator.getDefaultPopulators(world)) { - populator.populate(world, this.r, world.getChunkAt(X, Z)); + Chunk chunk = world.getChunkAt(X, Z); + if (MainUtil.canSetFast) { + ((BukkitSetBlockManager) BlockUpdateUtil.setBlockManager).update(Arrays.asList(chunk)); + } + populator.populate(world, this.r, chunk); } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java index d60667641..98b3a6dda 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/MainUtil.java @@ -51,6 +51,7 @@ import com.intellectualcrafters.plot.util.bukkit.SendChunk; public class MainUtil { public final static HashMap runners = new HashMap<>(); public static boolean canSendChunk = false; + public static boolean canSetFast = true; public static ArrayList runners_p = new ArrayList<>(); static long state = 1; public static HashMap lastPlot = new HashMap<>();