Paradaux
IssuesPAR-150Planned
0

Bug: General caching issues with usernames

Symptom

Staff can't run /gov payout, /fine issue, or /bal against certain players (examples: Dodrio3, dearev) — the command reports the target as unknown/unresolvable, even though the account exists.

Root cause (grounded)

All three resolve a username via cache-only Bukkit.getOfflinePlayerIfCached(name), which returns null whenever the player isn't currently in the server usercache:

  • /gov payoutGovCommand.doExternalPayout (treasury/.../commands/GovCommand.java:681): getOfflinePlayerIfCached(toName), then knownPlayer = hasPlayedBefore()||isOnline(); null → "unknown-recipient".
  • /fine (FineCommand) and /bal (BalanceCommand) take an OfflinePlayer arg resolved by Hibernia's OfflinePlayerResolver (hibernia-framework/.../commander/resolvers/OfflinePlayerResolver.java:30), which deliberately uses getOfflinePlayerIfCached (NOT getOfflinePlayer(String) — that does a blocking Mojang lookup which breaks Bedrock/Floodgate names).

So any target who has aged out of (or was never loaded into) the usercache since the last restart can't be addressed by name. Same cache-dependency PAR-142 documents for /pay.

Fix direction

Add a deterministic DB-backed name→UUID/account fallback for when the usercache misses, instead of relying on Bukkit cache state. Treasury has no general name cache today; business owns firm_players(current_name → uuid) (FirmPlayerMapper.getByName), and player_login_times exists. The clean fix is the unified economy_players(name_lower → uuid) table proposed in PAR-35 — once it exists, route all bare-name resolution through it; interim: a PERSONAL-account name lookup on AccountService.

Acceptance

  • /gov payout, /fine, /bal resolve a known player by name regardless of usercache state (test with a player who has played but isn't currently cached).
  • Bedrock/Floodgate names still avoid the blocking Mojang lookup.

Related: PAR-149 (same root cause, Bedrock employees), PAR-142 (/pay cache-dependency), PAR-35 (unified player table = the proper resolver source).

Comments

No comments yet.

Activity

  • tesks description: Description updatedJun 15, 2026, 5:45 AM
  • paradaux changed status to Status → PlannedJun 15, 2026, 12:41 AM
  • tesks created the issueJun 13, 2026, 7:55 PM