Skip to content

Commit

Permalink
fix: Readme URLs
Browse files Browse the repository at this point in the history
fix: Get build working
fix: Allow /linfo without player argument
  • Loading branch information
0ffz committed Dec 23, 2024
1 parent e32443e commit 105b537
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<div align="center">

# 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)
</div>

DeeperWorld is a plugin used on the Mine in Abyss server to create the illusion of a world taller than Minecraft's 256
Expand Down
5 changes: 2 additions & 3 deletions src/main/kotlin/com/mineinabyss/deeperworld/DeeperCommands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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}")
Expand Down Expand Up @@ -183,4 +182,4 @@ object DeeperCommands {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ 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)

//allow chest protection signs to be placed
if (player.inventory.itemInMainHand.type.name.contains("SIGN")
|| !BlockLockerAPIv2.isAllowed(player, block, true)
|| !BlockLockerAPIv2.isAllowed(player, linkedBlock, true)
)
return
) return
}

if (container is Lidded) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 105b537

Please sign in to comment.