PAR-125
0
Let players self-sync their explorer roles in-game (/treasuryapi ui sync)
DoneNormalUnassignedEconomy ExplorerFeature
A player whose in-game LuckPerms rank changed had to wait up to the ~30-min reconciliation cron (or an admin) before their explorer group capabilities updated. Let them trigger their own reconciliation on demand.
Design: in-game command (the explorer can't see LuckPerms — only the plugin can). /treasuryapi ui sync reconciles the calling player's source='luckperms' group memberships immediately; the website reflects it on the next page load (getViewer re-reads per request).
Implementation (treasury-api-plugin):
GroupReconciliationTask.reconcilePlayer(UUID)— per-player version of the cron's reconcile: for each synced group, resolve members via the samematcherFor/searchAllpath and add/remove just this player's luckperms row. Carries the same empty-result guard as the cron (an empty resolve never prunes the player) and only touchessource='luckperms'rows (manual grants untouched).UiAccessHandler.doSelfSync(Player)— guards on LuckPerms being installed (the reconciliation task + its LuckPerms dep are only bound when present; resolved lazily via the injector), runs the per-player reconcile, messages the player.@Route("ui sync")(treasuryapi.ui.sync, default true, player-only, async).- Messages:
treasuryapi.ui.sync.done|unavailable|failed.
Builds + tests green. Self-service from the web (a button that enqueues a request the plugin polls) is the deferred Option B if desired later.
Comments
No comments yet.
Activity
- paradaux description: Description updated
- paradaux changed status to Status → Done
- tesks changed status to Status → Pending Release
- tesks created the issue