mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 16:46:45 +01:00
Should fix #209
This commit is contained in:
parent
4d7cc990e2
commit
fd39eb036d
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ import com.intellectualcrafters.plot.util.bukkit.SendChunk;
|
||||
public class MainUtil {
|
||||
public final static HashMap<Plot, Integer> runners = new HashMap<>();
|
||||
public static boolean canSendChunk = false;
|
||||
public static boolean canSetFast = true;
|
||||
public static ArrayList<String> runners_p = new ArrayList<>();
|
||||
static long state = 1;
|
||||
public static HashMap<String, PlotId> lastPlot = new HashMap<>();
|
||||
|
Loading…
Reference in New Issue
Block a user