Skip to content

Commands and Permissions

EmakiAccessory registers its commands at runtime instead of declaring a commands: section in paper-plugin.yml.

The main command is /emakiaccessory, with the aliases /eaccessory and /eacc. Running it without arguments, or with an unrecognised subcommand, prints the help text.

Subcommands

UsagePermissionDescription
/eaccnonePrint 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, and per-page occupancy.
/eacc retrieve <page>emakiaccessory.useRetrieve accessories from orphan slots on that page.
/eacc reloademakiaccessory.reloadReload configuration, parts, pages, and sets.
/eacc debugemakiaccessory.debugDebug switches.
/eacc admin <...>emakiaccessory.adminAdministrative commands, see below.

open, list, pages, and retrieve are player-only. While a player's data is still loading, they report that instead of returning an empty result.

Administrative Commands

UsageExtra permissionDescription
/eacc admin view <player>noneView accessories (read-only).
/eacc admin edit <player>emakiaccessory.admin.editEdit accessories, online players only.
/eacc admin clear <player>noneClear accessories. Cannot be undone and is written to the log.
/eacc admin savenoneFlush all accessory data immediately.

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

view supports offline players: when the target is not cached, the data is loaded asynchronously and opened in a read-only window. edit requires an online target because a writable window needs a live data session.

Pages and retrieval

With the multi-page model, command scope matters:

CommandScope
open [page]Opens that page's GUI; it will not open without the page permission
listLists slots on the currently enabled page only
pagesLists all pages and marks the enabled and unavailable ones
retrieve <page>Retrieves orphan-slot accessories on that page only

An orphan slot is one that still holds data on a page whose parts no longer declares it. Retrieval is one-way: once taken out, an item 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, but the player can recover the items with retrieve.

Permission Nodes

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

PermissionDefaultPurpose
emakiaccessory.usetrueOpen your own accessory panel, list slots and pages, and retrieve orphan slots.
emakiaccessory.reloadopReload configuration.
emakiaccessory.debugopDebug switches.
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.

Page permissions and command permissions are separate concerns: 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 but every mutation 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.