AnvilSearchGui

constructor(player: ServerPlayer, title: Component, defaultText: String, validator: (String) -> AnvilSearchGui.ValidationResult, onConfirm: (String) -> Unit, onCancel: () -> Unit)(source)

Parameters

player

The player viewing the GUI

title

Title displayed on the anvil screen

defaultText

Initial text in the input field

validator

Called on each keystroke to validate input

onConfirm

Called when the player clicks the confirmed valid result

onCancel

Called when the player closes the GUI or clicks cancel