Commands
AstralPlayerShops registers a single base command with the aliases /ps and /playershops (@CommandAlias("ps|playershops") on PSCommand).
Subcommand | Sender | Description |
|---|---|---|
| player only | View a recap of your own shops' recent activity. |
| console or player | Reload the plugin configuration. |
| player only, hidden | Invoked by the away-recap notification click — not meant to be typed directly. |
/ps recap
Player-only (the handler takes a Player, so it cannot be run from console). Computes the recap of the player's own shops over the window from now - recap-interval to now (recap-interval is a duration read from Configuration) via ShopService#computeRecap, then opens the playershops-daily-recap dialog with the result.
If the computation fails,
UNEXPECTED_ERRORis sent to the player and the error is logged.If the recap has no entries,
RECAP_NOTHING_TO_SHOWis sent and the dialog is not opened.Otherwise the dialog is opened with three values:
entries(the list of recap entries),spent(sum ofearnings()over entries wheretype() == SELL), andearned(sum ofearnings()over entries wheretype() == BUY).
See Activity Recaps.
/ps reload
Permission: playershops.reload. Takes a CommandSender, so it can be run from console as well as in-game. Calls AstralPlayerShops#loadConfiguration(), which reloads, in order: config.yml, messages.yml, the menus service, and the dialogs service. Reports success or failure back to the sender and logs failures to console.
/ps internalRecap
Marked @Private, so it is hidden from tab-completion and command listings but still invocable. Player-only. This is the command run by the <click:run_command:'/ps internalrecap'> embedded in the recap-notification message that RecapListener sends to a player on login when they were away long enough (and had unseen shop activity) — see Activity Recaps.
It looks up the player's PSPlayerData via SyncAPI.findData and reads lastLogout(). If lastLogout() is <= 0 (no recorded logout), it sends RECAP_NOTHING_TO_SHOW. Otherwise it computes the recap from lastLogout() onward through the same ShopService#computeRecap path as /ps recap, and opens the playershops-absent-recap dialog with the same entries/spent/earned values.
Permission summary
Node | Grants |
|---|---|
| Run |
| Bypass shop-ownership checks — |
(configurable) nodes under | Each configured node maps to a per-player shop limit; a player holding one of the nodes gets that limit if it is higher than their current one. See Configuration. |
plugin.yml does not declare a permissions: block for any of these nodes, so they carry no plugin-defined default — access is entirely governed by whatever permission plugin the server uses.