Added await function for paged book input
This commit is contained in:
@@ -42,13 +42,20 @@ fun Player.awaitAnvilInput(
|
|||||||
PlayerInputAnvilInv(this, callback, timeoutSeconds, invTitle, startText, renameItemDescription)
|
PlayerInputAnvilInv(this, callback, timeoutSeconds, invTitle, startText, renameItemDescription)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Player.awaitBookInput(
|
fun Player.awaitBookInputAsString(
|
||||||
timeoutSeconds: Int = 1 * 60,
|
timeoutSeconds: Int = 1 * 60,
|
||||||
callback: (PlayerInputResult<String>) -> Unit
|
callback: (PlayerInputResult<String>) -> Unit
|
||||||
) {
|
) {
|
||||||
PlayerInputBookComprehensive(this, callback, timeoutSeconds)
|
PlayerInputBookComprehensive(this, callback, timeoutSeconds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Player.awaitBookInputAsList(
|
||||||
|
timeoutSeconds: Int = 1 * 60,
|
||||||
|
callback: (PlayerInputResult<List<String>>) -> Unit
|
||||||
|
) {
|
||||||
|
PlayerInputBookPaged(this, callback, timeoutSeconds)
|
||||||
|
}
|
||||||
|
|
||||||
class PlayerInputResult<T> internal constructor(val input: T?)
|
class PlayerInputResult<T> internal constructor(val input: T?)
|
||||||
|
|
||||||
internal abstract class PlayerInput<T>(
|
internal abstract class PlayerInput<T>(
|
||||||
|
Reference in New Issue
Block a user