Example of inventory with Fail Item. In this example, if the player is not creative a barrier with the name error will be displayed for 10 ticks.
Documentation:
https://docs.zmenu.dev/configurations/buttons#error-item-zmenu
Example:
Code (YAML):
name
:
"&8&lError Item"
size
: 54
items:
example:
item:
material
: DIAMOND
name
:
"&aClick here"
slot
: 22
error_item:
duration
: 10
# Duration of item display
item
:
# Item to display
material
: BARRIER
name
:
"&cError"
lore
:
-
"&7You must be in creative !"
click_requirement:
left_click:
clicks
:
-
ALL
requirements:
- type
: placeholder
placeholder
:
"%player_gamemode%"
value
:
"CREATIVE"
action
: equals_string
![[IMG]](/proxy/image?url=https%3A%2F%2Fimg.groupez.dev%2Fzmenu%2Fpagination.gif)
Displays a list of items that look similar with different properties. You save time by not repeating the same configuration dozens of times for just a few changes.
Documentation:
https://docs.zmenu.dev/configurations/buttons#pagination-zmenu
Example:
Code (YAML):
name
:
"&8&lPagination &r&7%page%&8/&7%maxPage%"
size
: 54
items:
example:
type
: PAGINATION
elements:
- material
: DIAMOND
name
:
"diaMond"
- material
: IRON_INGOT
name
:
"iron_INGOT"
- material
: EMERALD
name
:
"emeRald"
- material
: COAL
name
:
"cOAl"
- material
: GOLD_INGOT
name
:
"gold_INGOT"
slots
:
- 21-23
item:
material
:
"%material%"
name
:
"&e%index% &7- &b%current%"
lore
:
-
"&8&m-----------------------"
-
""
-
"&f%name% &8- &7Normal"
-
"&f%upper_name% &8- &fUpper case"
-
"&f%lower_name% &8- &7lower case"
-
"&f%capitalize_name% &8- &7Capitalized"
-
""
-
"&8&m-----------------------"
next:
type
: NEXT
isPermanent
: true
slot
: 50
item:
material
: ARROW
name
:
"&fNext"
previous:
type
: PREVIOUS
isPermanent
: true
slot
: 48
item:
material
: ARROW
name
:
"&fPrevious"
![[IMG]](/proxy/image?url=https%3A%2F%2Fimg.groupez.dev%2Fzmenu%2Fdynamic_pagination.gif)
Lets you create a dynamic inventory with placeholders. You can use this to create a ranking for example. The only limit is your imagination.
Documenation:
https://docs.zmenu.dev/configurations/buttons#dynamic-pagination-zmenu
Example:
Code (YAML):
name
:
"&8Dynamic Pagination &7%page%/%maxPage%"
size
: 54
items:
pagination:
type
: DYNAMIC_PAGINATION
start
: 10
end
:
"%zmenu+_pagination_size%"
slots
:
- 20-24
- 29-33
item:
material
: IRON_INGOT
name
:
"&fHey its &e%zmenu+_pagination_name_%value%% &8- &f%index%"
lore:
- "&7Index&8
:
&f%index%"
- "&7Current&8
:
&f%current%"
- "&7Value&8
:
&f%value%"
next:
type
: NEXT
isPermanent
: true
slot
: 50
item:
material
: ARROW
name
:
"&fNext"
previous:
type
: PREVIOUS
isPermanent
: true
slot
: 48
item:
material
: ARROW
name
:
"&fPrevious"
![[IMG]](/proxy/image?url=https%3A%2F%2Fimg.groupez.dev%2Fzmenu%2Finput.gif)
Allows you to let the player write a message in the chat and perform actions in case of success or error.
Input type:
- NUMBER - Allows to check a number, you can set a minimum and maximum
- TEXT - Allows to check a text, you can set regex
- ONLINE_PLAYER - Allows to check the nickname of a player online
You can add conditions. For type NUMBER it is a minimum and maximum. For type TEXT it is a regex.
In this example the button allows to check if the chosen number is between 0 and 100
Code (YAML):
name
:
"&8Input Inventory"
size
: 27
items:
chooseAmount:
slot
: 13
type
: INPUT
item:
material
: DIAMOND_SWORD
name
: '&fChoose a number'
lore
:
- ''
- '&7Please choose a number between &b0&f and &a100'
# Type of input to check
# NUMBER - Allows to check a number, you can set a minimum and maximum
# TEXT - Allows to check a text, you can set regex
# ONLINE_PLAYER - Allows to check the nickname of a player online
inputType
: NUMBER
# Conditions has checked, works with PlaceholderAPI
conditions:
min
: 0
max
: 100
# regex: "^[a-zA-Z0-9]+$"
# Action performed in case of successful conditions
success_actions:
- type
: console_command
commands
:
-
"bc %player% has just chosen the number %input% !"
# or placeholder: %zmenu_input%
# Action performed in case conditions failed
error_actions:
- type
: message
messages
:
-
"&cYou must choose a number between 0 and 100."
# Action performed when clicking, by default the inventory will not close, you must close it, then send a message or perform other action at the same time
actions:
- type
: message
messages
:
-
"&7Please choose a number between &b0&f and &a100&8:"
- type
: close