diff --git a/gradle.properties b/gradle.properties index e253746..c70906a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=com.mineinabyss version=0.11 -idofrontVersion=0.24.12 +idofrontVersion=0.25.6 diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt index 45b2eef..9bac9d4 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt @@ -26,7 +26,7 @@ import org.bukkit.inventory.ItemStack private fun updateProtection(block: Block) = - blockLocker.protectionFinder.findProtection(block, SearchMode.ALL).ifPresent { + blockLocker?.protectionFinder?.findProtection(block, SearchMode.ALL)?.ifPresent { it.signs.forEach { sign -> sign.location.sync(signUpdater()) } } diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt index ec129e9..116c88b 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/SectionSyncListener.kt @@ -38,7 +38,7 @@ import org.bukkit.event.world.StructureGrowEvent import org.bukkit.inventory.EquipmentSlot private fun syncBlockLocker(corr: Block) { - blockLocker.protectionFinder.findProtection(corr, SearchMode.ALL).ifPresent { + blockLocker?.protectionFinder?.findProtection(corr, SearchMode.ALL)?.ifPresent { it.signs.forEach { linkedSign -> linkedSign.location.block.type = Material.AIR } } } diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt index 5d81975..0213b02 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/Updaters.kt @@ -4,6 +4,7 @@ import com.mineinabyss.deeperworld.world.section.* import net.kyori.adventure.text.Component import nl.rutgerkok.blocklocker.BlockLockerAPIv2 import nl.rutgerkok.blocklocker.BlockLockerPlugin +import org.bukkit.Bukkit import org.bukkit.Location import org.bukkit.Material import org.bukkit.block.Block @@ -13,7 +14,7 @@ import org.bukkit.block.sign.Side import org.bukkit.inventory.ItemStack import org.bukkit.util.Vector -internal val blockLocker: BlockLockerPlugin by lazy { BlockLockerAPIv2.getPlugin() } +internal val blockLocker: BlockLockerPlugin? by lazy { Bukkit.getPluginManager().getPlugin("BlockLocker") as? BlockLockerPlugin } internal fun copyBlockData(original: Block, corresponding: Block) { corresponding.blockData = original.blockData.clone() diff --git a/src/main/resources/paper-plugin.yml b/src/main/resources/paper-plugin.yml index 7c3043c..b14071f 100644 --- a/src/main/resources/paper-plugin.yml +++ b/src/main/resources/paper-plugin.yml @@ -26,15 +26,7 @@ dependencies: required: false load: BEFORE join-classpath: true - ProtocolLib: - required: false - load: BEFORE - join-classpath: true FastAsyncWorldEdit: required: false load: BEFORE join-classpath: true - Multiverse-Core: - required: false - load: BEFORE - join-classpath: false