dynamic lists
dynamic lists
Dynamic lists populate buttons at show-time based on live server or player state.
Supported Sources
| Source | Description | Required Plugin |
|---|---|---|
online_players |
All players currently on the server | None |
friends |
The player's friend list | None / Mock provider |
dynamic-buttons (simple mode)
For the simplest cases, just a list with default button styling, use dynamic-buttons:
homes-menu:
title: "<green>Your Homes"
type: multiAction
columns: 2
dynamic-buttons: homes
The plugin generates one styled button per home automatically. No template needed.
dynamic-list (template mode)
For full control over how each entry looks, use dynamic-list with a template block. The plugin loops over all results from the source and renders the template for each entry, substituting $(variable) placeholders.
Essentials Homes: available variables
$(home_name): name of the home (e.g.base,farm)$(home_world): world folder name where the home is set
homes-menu:
title: "<green>Your Homes"
type: multiAction
columns: 2
dynamic-list:
source: "essentials:homes"
template:
- label: "<gold>$(home_name)"
tooltip: "<gray>World: $(home_world)"
width: 150
action: static-run-command
command: "/home $(home_name)"
footer-buttons:
- label: "<gray>← Back"
width: 100
action: back
action-key: "dm:back"
Online Players: available variables
$(player_name): username of the online player
players-menu:
title: "<aqua>Online Players"
type: multiAction
columns: 2
dynamic-list:
source: "online_players"
template:
- label: "<aqua>$(player_name)"
tooltip: "<gray>Click to view profile"
width: 150
action: static-run-command
command: "/profile $(player_name)"
Friends: available variables
$(friend_name): friend's username$(friend_online):trueorfalse
friends-menu:
title: "<green>Friends"
type: multiAction
columns: 2
dynamic-list:
source: "friends"
template:
- label: "<yellow>$(friend_name)"
tooltip: "<gray>Online: $(friend_online)"
width: 150
action: static-run-command
command: "/msg $(friend_name) Hey!"
Combining dynamic and static buttons
dynamic-list buttons render first, then buttons, then footer-buttons. Use footer-buttons for navigation controls so they always appear at the bottom regardless of how many dynamic entries there are:
dynamic-list:
source: "essentials:homes"
template:
- label: "<gold>$(home_name)"
...
footer-buttons:
- label: "<yellow>Set New Home"
action: open-menu
target: set-home-menu
- label: "<gray>← Back"
action: back
action-key: "dm:back"