diff --git a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt index 08074b5..a80f6ed 100644 --- a/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt +++ b/src/main/java/com/derongan/minecraft/deeperworld/synchronization/SectionSyncListener.kt @@ -3,11 +3,10 @@ package com.derongan.minecraft.deeperworld.synchronization import com.derongan.minecraft.deeperworld.DeeperContext import com.derongan.minecraft.deeperworld.event.BlockSyncEvent import com.derongan.minecraft.deeperworld.event.SyncType -import com.derongan.minecraft.deeperworld.world.section.inSectionOverlap -import com.mineinabyss.idofront.events.call import com.derongan.minecraft.deeperworld.world.section.correspondingSection -import com.derongan.minecraft.deeperworld.world.section.isOnTopOf +import com.derongan.minecraft.deeperworld.world.section.inSectionOverlap import com.derongan.minecraft.deeperworld.world.section.section +import com.mineinabyss.idofront.events.call import com.mineinabyss.idofront.messaging.error import nl.rutgerkok.blocklocker.SearchMode import org.bukkit.Material @@ -42,7 +41,7 @@ private fun syncBlockLocker(corr: Block) { */ object SectionSyncListener : Listener { - @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) fun BlockBreakEvent.syncBlockBreak() { BlockSyncEvent(block, SyncType.BREAK).call { block.location.sync { original, corr -> @@ -119,15 +118,15 @@ object SectionSyncListener : Listener { val section = block.location.section ?: return val section2 = block.location.correspondingSection ?: return - if( + if ( block.location.inSectionOverlap - && section.isOnTopOf(section2) +// && section.isOnTopOf(section2) && block.blockData !is Levelled // Water / Lava ) isCancelled = true - if(!section.isOnTopOf(section2)) { - block.sync() - } +// if(!section.isOnTopOf(section2)) { +// block.sync() +// } } @EventHandler