Skip to content

Feat/hud - #49

Merged
ammodev merged 2 commits into
version/26.2from
feat/hud
Oct 8, 2026
Merged

ammodev merged 2 commits into
version/26.2from
feat/hud

Conversation

@TheBjoRedCraft

Copy link
Copy Markdown
Contributor

No description provided.

@TheBjoRedCraft TheBjoRedCraft self-assigned this Oct 7, 2026
Copilot AI balanced review requested due to automatic review settings October 7, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.show now takes an optional ProtectedRegion?, treats the global region as "Wilderness", and renders text in small caps + bold.
  • BorderCrossingHandler now 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.

@ammodev
ammodev merged commit 42cd4b8 into version/26.2 Oct 8, 2026
1 check passed
@TheBjoRedCraft
TheBjoRedCraft deleted the feat/hud branch October 8, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants