- Для версий
- 1.8.✘
- 1.9.✘
- 1.10.✘
- 1.11.✘
- 1.12.✘
- 1.13.✘
- 1.14.✘
- 1.15.✘
- 1.16.✘
- 1.17.✘
- 1.18.✘
- 1.19.✘
- 1.20.✘
- 1.21.✘
Описание плагина zMenu+:
zMenu+ - это аддон для zMenu, который добавит вам больше контента.Пример инвентаря с предметом Fail. В этом примере, если игрок не является творческим, барьер с именем error будет отображаться в течение 10 тиков.
Документация: Buttons | zMenu
Пример:
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
Документация: Buttons | zMenu
Пример:
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"
Документация: Buttons | zMenu
Пример:
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"
Позволяет позволить игроку написать сообщение в чат и выполнить действия в случае успеха или ошибки.
Тип ввода:
NUMBER - Позволяет проверить число, вы можете установить минимум и максимум.
TEXT - Позволяет проверить текст, можно задать regex
ONLINE_PLAYER - Позволяет проверить никнейм игрока в сети.
Вы можете добавлять условия. Для типа NUMBER это минимум и максимум. Для типа TEXT - регекс.
В данном примере кнопка позволяет проверить, находится ли выбранное число в диапазоне от 0 до 100
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