Menus
Find every screen of /protections, restyle a button, and look up the file and action behind each one.
Everything players do with their land happens in menus opened from /protections. Every button carries
the protection's id in its action, so a screen holds no state of its own: a click is checked again
against the protection as it is when the click arrives, and refused when the player lost the right to do
it in the meantime.
Before you start#
Menu texts, colours and the way buttons are placed follow ExyliaLib, see Menus, Colours and Messages and languages. Edit only the files under menus/user/; the menus/admin/ ones are rewritten on every start.
Change a button#
Open the file
In the plugin folder open lang/<language>/menus/user/, for example main.yml for the /protections hub, in the language ExyliaLib is set to.
Edit it
Change a button's name, lore or slot, or its condition. Find the file for each screen in The other screens and the overview below.
Reload
Run /protectionsadmin reload.
Check that it works#
Run /protections and look at the button you changed. A file that does not parse is named in the console and left out, instead of opening as an empty screen.
The files#
Every screen is a file under lang/<language>/menus/, in the language folder ExyliaLib is set to (en,
es, pt, fr, ru or tr).
| Folder | Owner | On update |
|---|---|---|
menus/user/ | Yours. Restyle, move and reword freely. | Kept. Only missing files are written. A release that has to change a screen's layout raises its menu-version; that file is then replaced and your previous one kept next to it. |
menus/admin/ | The plugin's. | Rewritten from the jar on every start, so staff screens always match the release. |
Each file's header comment lists the placeholders it receives. Buttons show only while their condition
holds; the %…_enabled% placeholders are true or false from submodules. An action prefixed with
left:, right:, shift_left: or shift_right: runs on that click only; without a prefix it runs on any
click.
Many screens place their buttons through a groups entry instead of fixed slots: a group names a range
of slots ("19-25", for example), and the buttons that name it with group: are drawn centred in that
range, in file order, leaving no gaps for the ones whose condition hides them. The slots below are where
the shipped files put each button with everything on; with fewer buttons visible they close up around the
centre.
Menu files are read when the plugin enables and again on /protectionsadmin reload (or
/protections admin reload) and /exylialib reload. A file that does not parse
is named in the console and left out, instead of opening as an empty screen.
The hub#
/protections (or /ps, /claims) opens menus/user/main.yml, a 27-slot screen.
| Slot | Button | Shown while | Action |
|---|---|---|---|
| 4 | Your land: how many they own out of their limit, and how many they own or belong to | always | none |
| row 10-16 | My protections | always | list |
| row 10-16 | Shop, with how many tiers are for sale | cores.enabled and some tier has a price | shop |
| row 10-16 | Select land | selection.enabled and the player holds exyliaprotections.select | select |
| row 19-25 | For sale, with how many are listed | submodules.market | market |
| row 19-25 | For rent | submodules.rent | rent |
| row 19-25 | Public warps | submodules.warps | warps |
The first three are the group own and the last three the group offers, each drawn centred in its row.
The list#
menus/user/list.yml: every protection the player owns or belongs to, on any server, oldest first, 36 to
a page. Each shows its owner, the player's role, size, location, server and member count.
| Click | What it does |
|---|---|
| Left-click | Opens the protection's overview. |
| Right-click | Teleports home, with the teleport countdown. |
| Back (slot 49) | The hub. |
The overview#
menus/user/manage.yml is one protection's own screen: 45 slots, a summary at the top and one button per
section, drawn centred in slots 19 to 25 (the group sections). It needs membership; admins open
anybody's. A member also opens it by right-clicking the protection's core (not sneaking).
Overview buttons and section cards
| Slot | Button | Shown while | Action |
|---|---|---|---|
| 4 | The protection: owner, the player's role, tier, size, members, location, server | always | none |
| row 19-25 | Land | always | section <id> land |
| row 19-25 | People | always | section <id> people |
| row 19-25 | Access | always | section <id> access |
| row 19-25 | Economy | two or more of bank, upkeep, market, and rent with rent.whole-protection | section <id> economy |
| row 19-25 | Growth | both upgrades and subregions | section <id> growth |
| row 19-25 | Defense | both raids and logs | section <id> defense |
| row 19-25 | Extras | both warps and perks (effects or environment) | section <id> extras |
| 36 | Teleport home | always | home <id> |
| 40 | Back | always | manage_back <id> |
| 44 | Delete | always | delete <id> |
A section page never holds a single card. When only one feature of the Economy, Growth, Defense or Extras
section is on, the overview shows that feature's own card in the section's place (economy_bank,
economy_upkeep, economy_market, economy_rent, growth_upgrade, growth_subregions, defense_raid,
defense_logs, extras_warp, extras_perks), running the same action the section's card would; with none
on, nothing is shown. The placeholders %economy_view%, %growth_view%, %defense_view% and
%extras_view% say which: section (two or more on), the key of the only card on (bank, upkeep,
market, rent, upgrade, subregions, raid, logs, warp, perks), or none. The older
%economy_enabled%, %growth_enabled%, %defense_enabled% and %extras_enabled% still work.
Back returns to the list, except for an admin looking at somebody else's protection, who goes back to the admin screen they came from. Every button is shown to every member; one their role does not allow answers "You cannot do that in this protection."
Sections, and the section that sticks#
Each section is a 36-slot screen, menus/user/manage_<section>.yml, whose cards are drawn centred in slots
10 to 16 (the group cards) and whose Back (slot 31) returns to the overview with section <id> hub.
The slots below are those of the shipped files with every card on.
Opening a section remembers it for that player and that protection. Every later reopening of the protection's screen — a Back from members, roles, bans or logs, or the screen coming back after a change — lands on that section again, not on the overview. It is forgotten when the player goes back to the overview, opens another protection, or leaves the server. Opening a protection from the list always starts on the overview.
Every section and its buttons
Land — manage_land.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 4 | Summary: size, location, core state | none | |
| 11 | Set home | set-home, standing inside on its server | sethome <id> |
| 12 | Rename | rename | rename <id> |
| 14 | Hide core | manage-core, standing on its server and world | hide <id> |
| 15 | Move protection | manage-core, standing on its server and world | move <id> |
| 16 | Show border (while visualization is on) | member | show <id> |
People — manage_people.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 12 | Members | manage-members | members <id> |
| 13 | Roles | manage-roles | roles <id> |
| 14 | Bans (while bans is on) | manage-bans | bans <id> |
Access — manage_access.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 12 | Flags | edit-flags | flags <id> |
| 13 | Lock, open or locked (while lock is on) | toggle-lock | lock <id> |
| 14 | Greeting & farewell (while enter-leave is on): left greeting, right farewell, shift + right clears both | rename | greeting <id> greeting|farewell|clear |
Economy — manage_economy.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 10 | Bank (while bank is on): left deposit, right withdraw | bank-deposit / bank-withdraw | bank <id> deposit|withdraw |
| 12 | Upkeep (while upkeep is on): pay what is due | member | upkeep <id> |
| 14 | Sell or give away (while market is on): left lists or unlists, right gives away | owner | sell <id>, transfer <id> |
| 16 | Rent out (while rent and rent.whole-protection are on) | manage-rent | rent_offer <id> * |
Growth — manage_growth.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 12 | Upgrade, level out of the highest (while upgrades is on) | owner | upgrade <id> |
| 13 | Plots, count out of the cap (while subregions is on) | manage-subregions | subregions <id> |
Defense — manage_defense.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 12 | Lives (while raids is on): buy a life back | member | raid_restore <id> |
| 14 | Logs (while logs is on) | view-logs | logs <id> all _ |
Extras — manage_extras.yml
| Slot | Button | Needs | Action |
|---|---|---|---|
| 12 | Public warp (while warps is on) | manage-warp | warp <id> |
| 14 | Perks & atmosphere (while effects or environment is on) | owner, or edit-environment | perks <id> |
Slot 4 of every section is a summary of what it holds and has no action.
The other screens#
Every list below is a 54-slot paged screen: up to 36 entries a page (fewer on the grid-shaped ones), previous and next page buttons, and Back in slot 49.
Every other screen
| File | Opened by | What it is |
|---|---|---|
user/members.yml | members | Members and clans; see Members and clans. Clans use clan_template. Add player (45), Add clan (46). |
user/roles.yml | roles | Roles, visitor last with visitor_template. Create role (45). |
user/permissions.yml | flags, role_edit, overrides, subregion_flags, subregion_overrides | One list of switches. Its title names what it edits. Clicking a switch runs toggle; Back runs back. |
user/shop.yml | shop | Every tier with a price. A click buys one core. |
user/bans.yml | bans | Running bans. Right-click lifts one. Ban player (45). |
user/logs.yml | logs | The audit log with its action and player filters (45, 46). |
user/market.yml | market | Protections for sale, each with its upkeep state and its bank, which goes to the seller (%protection_upkeep_state%, %protection_bank%, menu-version 3). Left buys, right visits. |
user/rent.yml | rent | The player's own rentals first (rented_template: left renews, right teleports home), then every offer (left rents, right visits). |
user/subregions.yml | subregions | A protection's plots. Create plot (45). |
user/subregion.yml | subregion | One plot's members (left role, shift + left overrides, right removes) and its buttons: add member (45), plot flags (46), private (47), rent out (51, while rent is on), delete (53). |
user/warps.yml | warps | Public warps. Left visits, right rates. Sort (45) cycles visits, rating, newest. |
user/warp.yml | warp | One protection's warp: publish, land here, rename, icon, description. |
user/perks.yml | perks | Perk switches for the owner, then time (38) and weather (42) while environment is on. |
admin/hub.yml | /protectionsadmin, admin_hub | The admin hub: protections, tiers, cleanup, settings, reload. See Administration. |
admin/settings.yml, settings_*.yml | settings_hub, settings_page, setting | The settings hub and its pages (general, features, systems, raids, upkeep, trade, teleport). |
admin/raid_replays.yml, raid_replay_controls.yml | /protectionsadmin replays | The raid replays list and the controls shown while watching. |
admin/admin.yml | /protectionsadmin list, admin | Every protection on the network, with filters. |
admin/admin_protection.yml | admin_protection | One protection's admin buttons, centred in slots 19 to 25; Set level only while upgrades is on. |
admin/tiers.yml, admin/tier.yml | admin_tiers, admin_tier | The tier editor. |
admin/cleanup.yml | admin_cleanup | The inactive cleanup preview. |
A switch in permissions.yml shows ON / OFF for flags and roles, ALLOW / DENY / ROLE
for a member's overrides, and ALLOW / DENY / PROTECTION (follow the protection) for a plot's
flags.
Actions#
Every button runs an action written exyliaprotections:<name> <arguments>, so a restyled menu can call any
of them. Placeholders such as %protection_id% fill the arguments. Up to four arguments are read.
Before running, every action is refused while its feature is off ("That feature is turned off."), when
the protection no longer exists ("That protection no longer exists."), or when the requirement below does
not let the player through. <id> is a protection id. Most player actions also ask for their feature node,
exyliaprotections.<feature>, which everybody holds by default ("Your rank does not include that feature.");
the Permissions page lists which.
Every action
Land and the protection itself
| Action | Arguments | Needs | What it does |
|---|---|---|---|
open | The hub | ||
list | The list | ||
shop | cores.enabled | The shop | |
select | exyliaprotections.select, selection.enabled | Hands out the selector | |
buy | <tier> | the tier's permission, cores.enabled | Buys one core of a tier with a price |
manage | <id> | member | The overview, or the section that stuck |
section | <id> <land|people|access|economy|growth|defense|extras|hub> | member | Opens a section and remembers it; hub or anything else opens the overview and forgets it |
manage_back | <id> | The list, or the admin screen for an admin outside the protection | |
home | <id> | member or tenant | Teleports home with the countdown |
sethome | <id> | set-home | Moves the home to where the player stands, inside |
rename | <id> | rename | Asks for a name, up to 32 characters of plain text |
hide | <id> | manage-core | Hides or shows the core |
move | <id> | manage-core | Moves the protection onto the block looked at, for settings.move-price |
delete | <id> | owner | Deletes after a confirmation and hands the core back, blank. Pays its upkeep first when abandoned, after asking; refused while upkeep is due |
raid_restore | <id> | member, raids | Buys a life back after a confirmation |
show | <id> | member, visualization | Draws the border |
People and access
| Action | Arguments | Needs | What it does |
|---|---|---|---|
members | <id> | manage-members | The members screen |
member_add | <id> | manage-members | Asks a player name, then a role |
clan_add | <id> | manage-members | Asks a clan tag, then a role |
member_role | <id> <uuid|clan:<clan>> | manage-members | Asks a new role |
member_remove | <id> <uuid|clan:<clan>> | manage-members | Removes a member or clan after a confirmation |
overrides | <id> <uuid> | manage-members | A member's override switches |
roles | <id> | manage-roles | The roles screen |
role_create | <id> | manage-roles | Asks a name and opens the new role |
role_edit | <id> <role> | manage-roles | A role's switches |
role_rename | <id> <role> | manage-roles | Asks a new name |
role_delete | <id> <role> | manage-roles | Deletes after a confirmation |
flags | <id> | edit-flags | The flag switches |
toggle | <id> <target> <key> | depends on the target | Flips one switch; see below |
back | <id> <target> | Leaves a switch screen: a role to roles, a member to members, a plot target to the plot, anything else to the protection | |
lock | <id> | toggle-lock, lock | Locks or unlocks; refused while visitor-entry is forced |
bans | <id> | manage-bans, bans | The bans screen |
ban_add | <id> | manage-bans, bans | Asks who and for how long, with a summary |
unban | <id> <uuid> | manage-bans, bans | Lifts a ban |
greeting | <id> <greeting|farewell|clear> | rename, enter-leave | Asks the greeting or farewell, or clears both. Anything but farewell and clear edits the greeting |
logs | <id> <action|all> <player|_> | view-logs, logs | The log, filtered; all and _ mean no filter |
logs_action | <id> <action|all> <player|_> | view-logs, logs | The log with the next action filter |
logs_player | <id> <action|all> | view-logs, logs | Asks a player name to filter by |
toggle targets, as PermissionTarget spells them:
| Target | Switches | Needs |
|---|---|---|
flags | The protection's flags | edit-flags; refused for a forced flag |
role:<name> | A role's permissions | manage-roles and holding the permission; not the role the player holds; never a management permission for visitor |
player:<uuid> | A member's overrides, cycling role, allow, deny | manage-members and holding the permission; not themselves |
sub:<plot>:flags | A plot's flags, cycling follow, on, off; visitor-entry excluded | manage-subregions; refused for a forced flag |
sub:<plot>:player:<uuid> | A plot member's overrides | manage-subregions and holding the permission; not themselves |
Economy and estates
| Action | Arguments | Needs | What it does |
|---|---|---|---|
bank | <id> <deposit|withdraw> | bank-deposit or bank-withdraw, bank | Asks an amount. Anything but withdraw deposits |
upkeep | <id> | member, upkeep | Pays what is due |
sell | <id> | owner, market | Asks a price and lists it, or unlists it when listed |
transfer | <id> | owner, market | Asks a player name and gives the protection away |
market | market | The market | |
market_buy | <id> | market | Buys a listed protection |
market_visit | <id> | market | Teleports to a listed protection |
upgrade | <id> | owner, upgrades | Upgrades to the next level |
subregions | <id> | manage-subregions, subregions | The plots screen |
subregion | <id> <plot> | same | One plot |
subregion_create | <id> | same | Hands out the selector, then asks the name |
subregion_delete | <id> <plot> | same | Deletes after a confirmation |
subregion_private | <id> <plot> | same | Toggles private and shared |
subregion_flags | <id> <plot> | same | The plot's flag switches |
subregion_member_add | <id> <plot> | same | Asks a name, then a role |
subregion_member_role | <id> <plot> <uuid> | same | Asks a new role |
subregion_member_remove | <id> <plot> <uuid> | same | Removes a plot member |
subregion_overrides | <id> <plot> <uuid> | same | A plot member's override switches |
rent_offer | <id> <plot|*> | manage-rent, rent | Asks price and period with a summary, or cancels the running offer. * or blank is the whole protection |
rent | rent | The rent screen | |
rent_take | <offer> | rent | Rents an offer |
rent_visit | <offer> | rent | Teleports to an offer |
rent_renew | <id> <plot|*> | rent | Renews the player's own rental |
Extras
| Action | Arguments | Needs | What it does |
|---|---|---|---|
warps | [visits|rating|newest] | warps | The public warps, sorted; visits by default |
warps_sort | <current sort> | warps | The same, sorted by the next order |
warp_visit | <id> | warps | Visits a warp |
warp_rate | <id> <sort> | warps | Asks one to five stars, then returns to the list in that order |
warp | <id> | manage-warp, warps | The protection's warp screen |
warp_toggle | <id> | same | Publishes or unpublishes |
warp_here | <id> | same | Moves the warp to where the player stands |
warp_rename | <id> | same | Asks the warp's name |
warp_icon | <id> | same | Asks the icon |
warp_description | <id> | same | Asks the description |
perks | <id> | owner or edit-environment; effects or environment | The perks screen |
perk_toggle | <id> <perk> | owner, effects | Turns an unlocked perk on or off |
time | <id> | edit-environment, environment | Next time of day |
weather | <id> | edit-environment, environment | Next weather |
Admin
Every one of these needs exyliaprotections.admin. They are described on
Administration.
| Action | Arguments | What it does |
|---|---|---|
admin_hub | The admin hub | |
settings_hub | The settings hub | |
settings_page | <page> | One settings page |
setting | <key> | Edits one setting |
admin_setting | <key> | Changes one setting: flips a switch, cycles a forced flag (allow, deny, not forced), adds or removes the admin's world, or asks a number or text |
admin_reload | Reloads the plugin, like /protectionsadmin reload | |
admin | The admin search | |
admin_filter | <owner|text|world|server|state> | Asks the owner or name filter, or cycles the world, server or state filter |
admin_filter_clear | <owner|text|world|server|state|all> | Clears one filter; anything else clears them all |
admin_protection | <id> | One protection's admin screen |
admin_teleport | <id> | Teleports to it |
admin_lives | <id> | Asks its lives (raids) |
admin_raid_clear | <id> | Ends its raid (raids) |
admin_abandoned | <id> | Takes it out of abandonment (upkeep) |
admin_level | <id> | Asks its level |
admin_transfer | <id> | Asks a new owner |
admin_delete | <id> | Deletes after a confirmation |
admin_tiers | The tier list | |
admin_tier | <tier> | One tier |
admin_tier_create | Asks a new tier id | |
admin_tier_edit | <tier> <item|name|lore|radius|height|y-radius|price|currency|permission|limit|lives|upkeep> | Edits one field |
admin_tier_flag | <tier> <flag> | Toggles a starting flag |
admin_tier_delete | <tier> | Deletes an unused tier after a confirmation |
admin_cleanup | Asks the days, then previews | |
admin_cleanup_view | <days> <true|false> | The preview, with or without never-seen players |
admin_cleanup_run | <days> <true|false> | Runs the cleanup after a confirmation |
Something missing on this page? Tell us on Discord