From 105b537c595fdd1c204cab657f9c9c7a8fee2c1c Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Mon, 23 Dec 2024 14:16:21 -0500 Subject: [PATCH] fix: Readme URLs fix: Get build working fix: Allow /linfo without player argument --- README.md | 5 ++--- .../kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt | 5 ++--- .../deeperworld/synchronization/ContainerSyncListener.kt | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e2913e3..f320852 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@
# DeeperWorld -[![Java CI](https://github.com/MineInAbyss/DeeperWorld/actions/workflows/main.yml/badge.svg)](https://github.com/MineInAbyss/DeeperWorld/actions/workflows/main.yml) [![Package](https://img.shields.io/maven-metadata/v?metadataUrl=https://repo.mineinabyss.com/releases/com/mineinabyss/deeperworld/maven-metadata.xml)](https://repo.mineinabyss.com/#/releases/com/mineinabyss/deeperworld) -[![Wiki](https://img.shields.io/badge/-Project%20Wiki-blueviolet?logo=Wikipedia&labelColor=gray)](https://wiki.mineinabyss.com/deeperworld) -[![Contribute](https://shields.io/badge/Contribute-e57be5?logo=github%20sponsors&style=flat&logoColor=white)](https://wiki.mineinabyss.com/contribute) +[![Docs](https://img.shields.io/badge/-Project%20Docs-blueviolet?logo=Wikipedia&labelColor=gray)](https://docs.mineinabyss.com/deeperworld) +[![Contribute](https://shields.io/badge/Contribute-e57be5?logo=github%20sponsors&style=flat&logoColor=white)](https://docs.mineinabyss.com)
DeeperWorld is a plugin used on the Mine in Abyss server to create the illusion of a world taller than Minecraft's 256 diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt b/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt index b3f83b9..e41b285 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt @@ -31,7 +31,6 @@ import com.sk89q.worldedit.world.World import io.papermc.paper.command.brigadier.argument.ArgumentTypes object DeeperCommands { - fun registerCommands() { deeperWorld.plugin.commands { ("deeperworld" / "dw") { @@ -52,7 +51,7 @@ object DeeperCommands { } } ("layerinfo" / "linfo" / "info" / "layers" / "layers") { - executes(ArgumentTypes.player().resolve().map { it.single() }) { player -> + playerExecutes { val section = WorldManager.getSectionFor(player.location) if (section == null) sender.info("${player.name} is not in a managed section") else sender.info("${player.name} is in section ${section.key}") @@ -183,4 +182,4 @@ object DeeperCommands { } } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt index 9e04bdb..fff663a 100644 --- a/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt +++ b/src/main/kotlin/com/mineinabyss/deeperworld/synchronization/ContainerSyncListener.kt @@ -40,7 +40,7 @@ object ContainerSyncListener : Listener { val linkedSection = block.location.correspondingSection ?: return val linkedBlock = block.location.getCorrespondingLocation(section, linkedSection)?.block ?: return - if (Plugins.isEnabled("BlockLocker")) { + blockLocker?.apply { updateProtection(linkedBlock) updateProtection(block) @@ -48,8 +48,7 @@ object ContainerSyncListener : Listener { if (player.inventory.itemInMainHand.type.name.contains("SIGN") || !BlockLockerAPIv2.isAllowed(player, block, true) || !BlockLockerAPIv2.isAllowed(player, linkedBlock, true) - ) - return + ) return } if (container is Lidded) { @@ -91,7 +90,8 @@ object ContainerSyncListener : Listener { val section = block.location.section ?: return val linkedSection = block.location.correspondingSection ?: return - val linkedBlock = block.location.getCorrespondingLocation(section, linkedSection)?.block?.state as? DecoratedPot ?: return + val linkedBlock = + block.location.getCorrespondingLocation(section, linkedSection)?.block?.state as? DecoratedPot ?: return deeperWorld.plugin.launch { delay(1.ticks)