diff --git a/gradle.properties b/gradle.properties index 4b1e18d..7ca2820 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ group=com.mineinabyss version=0.10 -idofrontVersion=0.25.17-dev.0 +idofrontVersion=0.25.17 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 92be964..d6fefff 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -gearyPaper = "0.31.0" -guiy="0.12.4" +gearyPaper = "0.31.2" +guiy="0.12.5" [libraries] geary-papermc = { module = "com.mineinabyss:geary-papermc", version.ref = "gearyPaper" } diff --git a/src/main/kotlin/com/mineinabyss/blocky/listeners/VanillaNoteBlockListener.kt b/src/main/kotlin/com/mineinabyss/blocky/listeners/VanillaNoteBlockListener.kt index 9641dbe..b2411cb 100644 --- a/src/main/kotlin/com/mineinabyss/blocky/listeners/VanillaNoteBlockListener.kt +++ b/src/main/kotlin/com/mineinabyss/blocky/listeners/VanillaNoteBlockListener.kt @@ -17,18 +17,22 @@ import org.bukkit.inventory.meta.SkullMeta class VanillaNoteBlockListener: Listener { @EventHandler - fun NotePlayEvent.onNotePlay() = with(block.world.toGeary()) { - isCancelled = true - block.vanillaNoteBlock?.interact(block, null, Action.LEFT_CLICK_BLOCK) + fun NotePlayEvent.onNotePlay() { + with(block.world.toGeary()) { + isCancelled = true + block.vanillaNoteBlock?.interact(block, null, Action.LEFT_CLICK_BLOCK) + } } @EventHandler - fun BlockPhysicsEvent.onRedstone() = with(block.world.toGeary()) { - val vanillaNoteBlock = block.takeIf { it.type == Material.NOTE_BLOCK }?.vanillaNoteBlock ?: return - - if (!block.isBlockIndirectlyPowered) return vanillaNoteBlock.powered(block, false) - if (!vanillaNoteBlock.powered()) vanillaNoteBlock.interact(block, null, Action.PHYSICAL) - vanillaNoteBlock.powered(block, true) + fun BlockPhysicsEvent.onRedstone() { + with(block.world.toGeary()) { + val vanillaNoteBlock = block.takeIf { it.type == Material.NOTE_BLOCK }?.vanillaNoteBlock ?: return + + if (!block.isBlockIndirectlyPowered) return vanillaNoteBlock.powered(block, false) + if (!vanillaNoteBlock.powered()) vanillaNoteBlock.interact(block, null, Action.PHYSICAL) + vanillaNoteBlock.powered(block, true) + } } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)