Skip to content

fix(command): require a permission for the start command - #405

Merged
TheMeinerLP merged 1 commit into
mainfrom
fix/start-command-permission
Oct 23, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
fix/start-command-permission

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Problem

/start (StartCommand) had no condition, so every player could force-start the lobby countdown.

Fix

StartCommand now guards itself like StopCommand: players need the permission cygnus.command.start, read from Adventure's PermissionChecker.POINTER (backed by LuckPerms via PermissionAwarePlayer, denied when the pointer is missing). Non-player senders such as the console stay allowed. The force-start logic is unchanged.

Tests

New StartCommandTest (4 tests, red before the fix, green after): player without permission denied, player with cygnus.command.start allowed, player with an unrelated permission denied, console allowed.

./gradlew :game:check --offline: BUILD SUCCESSFUL.

https://claude.ai/code/session_01GbSVcSYDK6Tgt287Se2Gs9

@github-actions github-actions Bot added the area: game Everything related to the the game module label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test results

  732 files    732 suites   6m 32s ⏱️
1 856 tests 1 854 ✅ 2 💤 0 ❌
5 568 runs  5 562 ✅ 6 💤 0 ❌

Results for commit 7e96aa0.

@TheMeinerLP
TheMeinerLP merged commit e32b2c7 into main Oct 23, 2026
9 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/start-command-permission branch October 23, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: game Everything related to the the game module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant