From 66eed3859eeb1500abcb116f7ff41c8ff25e2a5a Mon Sep 17 00:00:00 2001 From: bluefireoly Date: Sun, 25 Oct 2020 21:28:08 +0100 Subject: [PATCH] Added awaitBookInput --- src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt b/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt index e7c21930..d88a28f7 100644 --- a/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt +++ b/src/main/kotlin/net/axay/kspigot/chat/input/PlayerInput.kt @@ -41,6 +41,13 @@ fun Player.awaitAnvilInput( PlayerInputAnvilInv(this, callback, timeoutSeconds, invTitle, startText, renameItemDescription) } +fun Player.awaitBookInput( + timeoutSeconds: Int = 1 * 60, + callback: (String?) -> Unit +) { + PlayerInputBook(this, callback, timeoutSeconds) +} + internal abstract class PlayerInput( protected val player: Player, private val callback: (String?) -> Unit,