Package me.devnatan.inventoryframework
Class AnvilInputConfig
java.lang.Object
me.devnatan.inventoryframework.AnvilInputConfig
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) String(package private) UnaryOperator<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConfigures the view to close immediately when the player interacts with the item placed at container'sfirst result slot.initialInput(String initialInput) Sets the initial anvil text input value.onInputChange(UnaryOperator<String> inputChangeHandler) Setups a handler that can be used to transform the input provided by the player.
-
Field Details
-
initialInput
String initialInput -
closeOnSelect
boolean closeOnSelect -
inputChangeHandler
UnaryOperator<String> inputChangeHandler
-
-
Constructor Details
-
AnvilInputConfig
AnvilInputConfig()
-
-
Method Details
-
initialInput
Sets the initial anvil text input value.- Parameters:
initialInput- Initial anvil text input value.- Returns:
- This anvil input config.
-
closeOnSelect
Configures the view to close immediately when the player interacts with the item placed at container'sfirst result slot.- Returns:
- This anvil input feature config.
-
onInputChange
@Contract("_ -> this") public AnvilInputConfig onInputChange(UnaryOperator<String> inputChangeHandler) Setups a handler that can be used to transform the input provided by the player.Note that it's not called immediately, only when view is closed or the player interacts with the item placed at container's
first result slot.- Parameters:
inputChangeHandler- The input change handler.- Returns:
- This anvil input feature config.
-