awaitChatInput

fun Player.awaitChatInput(plugin: Plugin, timeoutTicks: Long? = null, onInput: (Component) -> Unit, onCancel: () -> Unit = {})

Utility for getting chat input from a player.

Parameters

plugin

The plugin instance.

timeoutTicks

The timeout in ticks (optional).

onInput

The callback for when input is received.

onCancel

The callback for when input is cancelled or timed out.