Skip to content

Commands and Permissions ​

EmakiAccessory registers its commands at runtime, so you will not find a commands: section in paper-plugin.yml

The main command is /emakiaccessory, with the aliases /eaccessory and /eacc. Running it with no arguments, or with a subcommand you did not mean, prints the help text

Subcommands ​

UsagePermissionDescription
/eacc, /eacc helpemakiaccessory.usePrint help
/eacc open [page]emakiaccessory.useOpen your own accessory panel; omitting the page opens the currently enabled one
/eacc listemakiaccessory.useList the slots and occupancy of the currently enabled page
/eacc pagesemakiaccessory.useList every accessory page, the enabled one, per-page occupancy and the pages you cannot use
/eacc retrieve <page>emakiaccessory.useRetrieve every accessory on that page (declared slots and orphan slots alike, back into the inventory, dropped at your feet when it does not fit)
/eacc reloademakiaccessory.reloadReload configuration, parts, pages, and sets, reporting slot, set and issue counts
/eacc debugemakiaccessory.debugForward to CoreLib's debug subcommand; reports command.debug_unavailable when debugging is unavailable
/eacc admin <...>emakiaccessory.adminAdministrative commands, see below

An unrecognised subcommand, or no argument at all, prints the help text. help is not a separate branch: it is the default when no subcommand matches (tab completion still offers it)

You can run reload and debug from the console; open, list, pages, retrieve as well as admin view and admin edit are player-only and tell the console sender that they are. While a player's data is still loading, they report general.data_loading instead of returning an empty result

The root command is registered with emakiaccessory.use, which is the command-entry requirement; each subcommand checks its own node on top of that. The permission defaults to true, so default setups are unaffected

Administrative Commands ​

UsageExtra permissionDescription
/eacc admin view <player>noneView accessories read-only; a target that is not cached is loaded asynchronously first, and a failed load reports command.admin_load_failed
/eacc admin edit <player>emakiaccessory.admin.editEdit accessories writably, online (loaded) targets only; an uncached target reports command.admin_target_offline
/eacc admin clear <player>noneClear every page of that player's accessories. Cannot be undone and is logged entry by entry (page, slot, material, amount, name); an unloaded target reports command.admin_target_offline
/eacc admin savenoneFlush all dirty data immediately and report how many entries were saved

All four require emakiaccessory.admin first. edit additionally requires emakiaccessory.admin.edit, splitting "may look" from "may change" so you can give support staff view access without edit access

view and edit must be run by a player; clear and save can be run from the console. <player> is matched against online names exactly first, then against the offline cache; when neither matches, command.unknown_player is reported

view supports offline players: when the target is not cached, the data is loaded asynchronously and then opened in a read-only window. edit requires an online target because a writable window needs a live data session; when another viewer already holds the write lease, command.admin_target_busy is reported

clear returns no items and only deletes data; it likewise requires that no other writer currently holds the target

Pages and retrieval ​

The panel has multiple pages, so first keep the scope of each command straight:

CommandScope
open [page]Opens that page's GUI; it will not open when the page is unknown or the page permission is missing
listLists slots on the currently enabled page only
pagesLists all pages and marks the enabled and unavailable ones
retrieve <page>Retrieves every accessory on that page (declared slots and orphan slots)

An orphan slot is one that still holds data on a page whose parts no longer declares it. retrieve ignores whether a slot is still declared: it takes every item on that page out through the inventory (dropped at the player's feet when it does not fit) and deletes them from the data. Retrieved items cannot be put back into an orphan slot. retrieve needs the player's write lease and reports a busy state when the lease is held elsewhere

When a player loses a page permission, that page's data is not cleared and the enabled page does not switch automatically. The page cannot be opened and its accessories stop contributing; the player can recover the items with retrieve

Permission Nodes ​

Permissions declared in paper-plugin.yml and their defaults:

PermissionDefaultPurpose
emakiaccessory.usetrueCommand-entry permission, also used to open your own panel, list slots and pages, and retrieve accessories
emakiaccessory.reloadopReload configuration
emakiaccessory.debugopDebug subcommand
emakiaccessory.adminopEnter administrative commands
emakiaccessory.admin.editopEdit another player's accessories
emakiaccessory.page.secondaryopExample page permission for the default secondary accessory page

This module has no permission tiers for slot count. The number of accessory slots is decided entirely by the parts and their count in parts.yml and is unaffected by permissions

Keep page permissions and command permissions separate: the permission field in pages/*.yml only decides whether a page can be opened and contributes, is used verbatim, and takes no part in command entry checks. The default resources declare a permission string only for secondary; custom pages choose their own

Write Lease ​

Only one writable window may hold a given player's accessory data at a time. The lease is advisory: a second viewer simply fails to acquire it and gets a read-only window instead, so they can still look while every edit is refused

The lease is checked on the commit path rather than at render time, so a viewer who lost it can still finish reading the current screen while being unable to change anything