diff --git a/engine/engine-paper/build.gradle.kts b/engine/engine-paper/build.gradle.kts index a140ca0093..eb314e19d4 100644 --- a/engine/engine-paper/build.gradle.kts +++ b/engine/engine-paper/build.gradle.kts @@ -60,6 +60,8 @@ dependencies { compileOnlyApi("com.github.retrooper:packetevents-spigot:2.7.0-SNAPSHOT") compileOnly("me.clip:placeholderapi:2.11.6") compileOnlyApi("org.geysermc.floodgate:api:2.2.3-SNAPSHOT") + + testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.18.0") } tasks.withType { diff --git a/engine/engine-paper/src/test/kotlin/com/typewritermc/utils/PlaceholderParserTest.kt b/engine/engine-paper/src/test/kotlin/com/typewritermc/utils/PlaceholderParserTest.kt index f93d32002f..43e632677e 100644 --- a/engine/engine-paper/src/test/kotlin/com/typewritermc/utils/PlaceholderParserTest.kt +++ b/engine/engine-paper/src/test/kotlin/com/typewritermc/utils/PlaceholderParserTest.kt @@ -158,7 +158,7 @@ class PlaceholderParserTest : FunSpec({ } } - checkAll() { string, action -> + checkAll { string, action -> parser.parse(null, listOf(string, action)) shouldBe "Hey $string, $action" } parser.parse(null, listOf("bob")) shouldBe null diff --git a/extensions/_DocsExtension/src/main/kotlin/com/typewritermc/example/entries/interaction/ExampleInteractionBound.kt b/extensions/_DocsExtension/src/main/kotlin/com/typewritermc/example/entries/interaction/ExampleInteractionBound.kt index 2ad8cb2f7a..5589f0b217 100644 --- a/extensions/_DocsExtension/src/main/kotlin/com/typewritermc/example/entries/interaction/ExampleInteractionBound.kt +++ b/extensions/_DocsExtension/src/main/kotlin/com/typewritermc/example/entries/interaction/ExampleInteractionBound.kt @@ -51,7 +51,7 @@ class ExampleBound( // A manual version of the above when (event.player.boundState) { - InteractionBoundState.BLOCKING -> event.cancelled = true + InteractionBoundState.BLOCKING -> event.isCancelled = true InteractionBoundState.INTERRUPTING -> InteractionEndTrigger.triggerFor(event.player, context()) InteractionBoundState.IGNORING -> {} } @@ -70,7 +70,7 @@ class ExampleBound( } // -class SomeCancellablePlayerEvent(player: Player, var cancelled: Boolean) : PlayerEvent(player, true), Cancellable { +class SomeCancellablePlayerEvent(player: Player) : PlayerEvent(player, true), Cancellable { override fun getHandlers(): HandlerList = HANDLER_LIST companion object { @@ -78,9 +78,6 @@ class SomeCancellablePlayerEvent(player: Player, var cancelled: Boolean) : Playe val HANDLER_LIST = HandlerList() } - override fun isCancelled(): Boolean = cancelled - - override fun setCancelled(isCancelled: Boolean) { - cancelled = isCancelled - } + override fun isCancelled(): Boolean = false + override fun setCancelled(p0: Boolean) {} } \ No newline at end of file