diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java index 78749339c8..d923fe6795 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/queue/BukkitQueueCoordinator.java @@ -62,19 +62,28 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator { private static final SideEffectSet EDGE_LIGHTING_SIDE_EFFECT_SET; static { - NO_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.LIGHTING, SideEffect.State.OFF).with( - SideEffect.NEIGHBORS, - SideEffect.State.OFF - ); - EDGE_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with( - SideEffect.NEIGHBORS, - SideEffect.State.ON - ); - LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.NEIGHBORS, SideEffect.State.OFF); - EDGE_LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with( - SideEffect.NEIGHBORS, - SideEffect.State.ON - ); + NO_SIDE_EFFECT_SET = enableNetworkIfNeeded() + .with(SideEffect.LIGHTING, SideEffect.State.OFF) + .with(SideEffect.NEIGHBORS, SideEffect.State.OFF); + EDGE_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET + .with(SideEffect.UPDATE, SideEffect.State.ON) + .with(SideEffect.NEIGHBORS, SideEffect.State.ON); + LIGHTING_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET + .with(SideEffect.NEIGHBORS, SideEffect.State.OFF); + EDGE_LIGHTING_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET + .with(SideEffect.UPDATE, SideEffect.State.ON) + .with(SideEffect.NEIGHBORS, SideEffect.State.ON); + } + + // make sure block changes are sent + private static SideEffectSet enableNetworkIfNeeded() { + SideEffect network; + try { + network = SideEffect.valueOf("NETWORK"); + } catch (IllegalArgumentException ignored) { + return SideEffectSet.none(); + } + return SideEffectSet.none().with(network, SideEffect.State.ON); } private org.bukkit.World bukkitWorld;