Skip to main content

INPUT Button Type

zMenu+ Required

This button type requires zMenu+ to work.

The INPUT button type allows you to capture text input from players. When clicked, it closes the inventory and prompts the player to type in chat. The input can then be used in actions or stored for later use.

Usage

items:
input-button:
type: INPUT
slot: 13
inputType: TEXT
conditions:
regex: "^[a-zA-Z0-9]*$"
success-actions:
- type: message
messages: ["&aValid input: %input%"]
error-actions:
- type: message
messages: ["&cInvalid input! Only alphanumeric characters allowed."]
item:
material: NAME_TAG
name: "&a&lEnter Text"

Configuration

PropertyDescriptionRequired
typeMust be INPUTYes
inputTypeType of input (TEXT, NUMBER, LONG, DECIMAL)No (Default: TEXT)
conditions.regexRegex to validate inputNo
conditions.minMinimum value/lengthNo (Default: 0)
conditions.maxMaximum value/lengthNo (Default: 0)
success-actionsActions to execute on valid inputNo
error-actionsActions to execute on invalid inputNo
itemVisual appearanceYes

Example

Nickname Changer

size: 27
name: "&8Change Nickname"

items:
change-nick:
type: INPUT
slot: 13
inputType: TEXT
conditions:
min: 3
max: 16
regex: "^[a-zA-Z0-9_]*$"
success-actions:
- type: console-command
commands:
- "nick %player% %input%"
- type: message
messages:
- "&aYour nickname has been changed to &e%input%"
error-actions:
- type: message
messages:
- "&cInvalid nickname! Must be 3-16 alphanumeric characters."
item:
material: NAME_TAG
name: "&a&lChange Nickname"
lore:
- "&7Click to change your display name"

back:
type: BACK
slot: 22
item:
material: ARROW
name: "&c&lBack"

Amount Input

items:
set-amount:
type: INPUT
slot: 13
inputType: NUMBER
conditions:
min: 1
max: 64
success-actions:
- type: data
key: "amount"
value: "%input%"
- type: message
messages: ["&aAmount set to %input%"]
- type: refresh
error-actions:
- type: message
messages: ["&cPlease enter a number between 1 and 64"]
item:
material: HOPPER
name: "&6&lSet Amount"
lore:
- "&7Current: &e%amount%"
- "&7Click to change"

Placeholders

PlaceholderDescription
%input%The text entered by the player

Notes

  • The inventory will close when the player needs to type
  • Validate input using conditions with regex, min, or max values
  • Use %input% in your actions to access the player's text

Next Steps

  • Learn about Actions to handle input
  • See NONE for standard buttons
Copyright © 2026 GroupeZ|Build #loading...|-