PlanetRealms zMenu addon. It adds the PR_LIST button type: a list of entries where each player only sees the
entries they pass, packed into the slots in order with no gaps, paged with zMenu's normal
NEXT / PREVIOUS buttons.
It's a separate plugin, so zMenu is not forked and updates normally.
tags:
type: PR_LIST
slots: [19-25, 28-34]
item: # default item for every element
actions: # default click actions for every element
else: # optional: item for leftover list slots (blocks clicks, shows a tooltip)
elements:
- id: santa # any plain key becomes a %key% placeholder
name: '<red>Santa'
view-requirement: # optional, same format as zMenu's view-requirement; all must pass
requirements:
- type: permission
permission: eternaltags.tag.santa
item: # optional override, merged over the default item
material: RED_WOOL
actions: # optional override, replaces the default actions
- type: closeview-requirement(also acceptsview_requirement/view-requirements): a player only sees the element if all its requirements pass. Deny/success actions are not run, it's only a filter.- Every
type: permissionnode used in element requirements is registered with the server (default: OP), so LuckPerms tab-completes it and its web editor lists it. - Element
item: fields you leave out fall back to the defaultitem, and nested sections merge. - Element
actions: replaces the default actions for that element only. - Placeholders: every plain key on an element (
id,name,description, ...) works as%key%in its item and actions. PlaceholderAPI placeholders work as normal. else: clicking it does nothing. Withoutelse, leftover slots stay empty.- Paging: the page size is the number of slots. zMenu's
NEXT/PREVIOUSand itshas_next_page/has_previous_pagechecks use this button's per-player size.
A full example is in examples/pr_list_example.yml.
gradle build # -> build/libs/zMenusAddon-1.0.0.jar
- Java 21, Paper 1.21.11.
- zMenu isn't on a public Maven repo, so it compiles against
libs/zMenu-1.1.1.9.jar(the same jar the server runs). When the server updates zMenu, replace that jar and updatebuild.gradle.kts.
- Put
zMenusAddon-1.0.0.jarinplugins/next to zMenu and restart (not/reload). - Use
type: PR_LISTin any zMenu inventory./zm reloadreloads menus as normal.
ZMenusAddonPluginregistersListButtonLoaderwith zMenu'sButtonManagerservice. zMenu then loads any menu that was waiting forPR_LIST.ListButtonLoaderreadselementsandelse. zMenu itself loadsslots,itemandactionsonto the button afterwards.ListButton extends PaginateButton:getPaginationSizereturns how many elements the player passes, andonRenderplaces the current page's slice into the slots and wires each slot's click to that element's actions.