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
input-message: "&eEnter your nickname:"
input-cancel: "cancel"
item:
material: NAME_TAG
name: "&a&lChange Nickname"

Configuration

PropertyDescriptionRequired
typeMust be INPUTYes
slotButton positionYes
input-messageMessage shown to player when waiting for inputYes
input-cancelWord to type to cancel (default: "cancel")No
itemVisual appearanceYes

Example

Nickname Changer

size: 27
name: "&8Change Nickname"

items:
change-nick:
type: INPUT
slot: 13
input-message:
- "&7"
- "&e&lEnter your new nickname"
- "&7Type your desired nickname in chat"
- "&7Type &ccancel &7to abort"
- "&7"
input-cancel: "cancel"
item:
material: NAME_TAG
name: "&a&lChange Nickname"
lore:
- "&7Click to change your display name"
actions:
- type: console-command
commands:
- "nick %player% %input%"
- type: message
messages:
- "&aYour nickname has been changed to &e%input%"

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

Search Function

items:
search:
type: INPUT
slot: 4
input-message: "&eEnter search term:"
input-cancel: "cancel"
item:
material: COMPASS
name: "&e&lSearch"
lore:
- "&7Click to search"
actions:
- type: inventory
inventory: "search_results"
arguments:
query: "%input%"

Amount Input

items:
set-amount:
type: INPUT
slot: 13
input-message:
- "&eEnter the amount to purchase:"
- "&7(1-64)"
input-cancel: "cancel"
item:
material: HOPPER
name: "&6&lSet Amount"
lore:
- "&7Current: &e%amount%"
- "&7Click to change"
click-requirement:
requirements:
- type: regex
input: "%input%"
regex: "^[1-9][0-9]?$|^64$"
deny:
- type: message
messages:
- "&cPlease enter a number between 1 and 64"
success:
- type: data
key: "amount"
value: "%input%"
- type: refresh

Placeholders

PlaceholderDescription
%input%The text entered by the player

Notes

  • The inventory will close when the player needs to type
  • Use input-cancel to allow players to abort the input
  • Validate input using click-requirement with regex

Next Steps

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