Paradaux
IssuesPAR-125Done
0

Let players self-sync their explorer roles in-game (/treasuryapi ui sync)

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 same matcherFor/searchAll path 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 touches source='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 updatedJun 7, 2026, 5:16 PM
  • paradaux changed status to Status → DoneJun 7, 2026, 5:16 PM
  • tesks changed status to Status → Pending ReleaseJun 7, 2026, 2:57 PM
  • tesks created the issueJun 7, 2026, 2:56 PM