Skip to content

fix: guard BossBarListener against null playerUUID from NPC/minion breaks - #558

Merged
tastybento merged 1 commit into
developfrom
fix/null-uuid-minion-bossbar
Aug 16, 2026
Merged

fix: guard BossBarListener against null playerUUID from NPC/minion breaks#558
tastybento merged 1 commit into
developfrom
fix/null-uuid-minion-bossbar

Conversation

@tastybento

@tastybento tastybento commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes Could not pass event MagicBlockEvent #557 — JetsMinions (and other NPC/minion plugins) break the magic block via armor stand entities, firing MagicBlockEvent with a null playerUUID. BossBarListener passed this null UUID to User.getInstance(), which threw IllegalArgumentException: UUID id cannot be null.
  • Added an early return in BossBarListener.onBreakBlockEvent when the player UUID is null — there's no player to display a bar to.
  • Added a test covering the null UUID scenario.

Test plan

  • Existing BossBarListenerTest passes (12/12)
  • New testNullPlayerUUIDDoesNotThrow verifies no exception and no bar/action bar display for null UUID events

…eaks

Fixes #557

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzNBkKFaxTn74woxZirskh
@tastybento
tastybento merged commit d581178 into develop Aug 16, 2026
1 check passed
@tastybento
tastybento deleted the fix/null-uuid-minion-bossbar branch August 16, 2026 19:05
@sonarqubecloud

Copy link
Copy Markdown

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.

Could not pass event MagicBlockEvent

1 participant