Anvil Search Gui
class AnvilSearchGui(player: ServerPlayer, title: Component, defaultText: String, validator: (String) -> AnvilSearchGui.ValidationResult, onConfirm: (String) -> Unit, onCancel: () -> Unit) : AnvilInputGui(source)
Reusable anvil input GUI with live validation feedback.
The right-side output slot dynamically shows a green checkmark (valid) or red indicator (invalid) as the player types. Used for book search, naming, and any text-entry workflow.
Parameters
player
The player viewing the GUI
title
Title displayed on the anvil screen
default Text
Initial text in the input field
validator
Called on each keystroke to validate input
on Confirm
Called when the player clicks the confirmed valid result
on Cancel
Called when the player closes the GUI or clicks cancel
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun openAsScreenHandler(syncId: Int, playerInventory: Inventory?, player: Player?): AbstractContainerMenu?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard