Repository navigation
Feat/hud - #49
Feat/hud#49
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
toSet?.regions?.firstOrNull() can select the global region ahead of a named region, causing the HUD to incorrectly display "Wilderness" since the global region is not filtered out as it is in the fallback path.
1 open finding
What changed in this PR
This PR enhances the region HUD feature. It lets HudManager.show accept a specific region (so it can be driven directly by the border-crossing event instead of always re-querying the player's location), updates the HUD text to render the region name in bold small caps, and adds explicit handling for the global region so the HUD displays "Wilderness" when the player is not in a named region.
Changes:
HudManager.shownow takes an optionalProtectedRegion?, treats the global region as "Wilderness", and renders text in small caps + bold.BorderCrossingHandlernow always refreshes the HUD when available (dropping the entered/exited-empty guard) and passes the destination region directly.
| File | Description |
|---|---|
src/main/kotlin/dev/slne/surf/protect/paper/hud/HudManager.kt |
Adds optional region param, global-region handling, and small-caps/bold text formatting. |
src/main/kotlin/dev/slne/surf/protect/paper/listener/listeners/BorderCrossingHandler.kt |
Simplifies the HUD trigger condition and passes the destination region into HudManager.show. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

No description provided.