Skip to content

Conversation

@TheBjoRedCraft
Copy link
Member

This pull request introduces permission checks for selecting game modes and refines the command suggestion system to only show game modes the user has access to. It also adds new permission entries for each game mode in the permission registry and bumps the project version.

Permission system improvements:

  • Added permission checks in GameModeArgument to ensure that users can only select game modes for which they have the appropriate surf.essentials.gameMode.<gamemode> permission. If the user lacks permission, a specific error message is shown.
  • Updated game mode suggestions in GameModeArgument to only display modes the sender has permission to use.

Permission registry updates:

  • Added new permission entries in EssentialsPermissionRegistry for each game mode: creative, survival, adventure, and spectator.

Version update:

  • Bumped project version from 1.21.11-2.0.10-SNAPSHOT to 1.21.11-2.0.11-SNAPSHOT in gradle.properties.

@TheBjoRedCraft TheBjoRedCraft self-assigned this Jan 27, 2026
Copilot AI review requested due to automatic review settings January 27, 2026 19:51
@TheBjoRedCraft TheBjoRedCraft requested a review from a team January 27, 2026 19:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces per-game-mode permission enforcement in command argument parsing and suggestion generation so users can only select/suggest game modes they’re authorized to use.

Changes:

  • Added permission checks in GameModeArgument for surf.essentials.gameMode.<gamemode>.
  • Filtered game mode tab-completions to only show permitted modes.
  • Registered new per-mode permission nodes and bumped the project version.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/main/kotlin/dev/slne/surf/essentials/util/permission/EssentialsPermissionRegistry.kt Adds new permission nodes for each game mode in the permission registry.
src/main/kotlin/dev/slne/surf/essentials/command/argument/GameModeArgument.kt Enforces per-mode permission checks during parsing and filters suggestions based on permissions.
gradle.properties Bumps snapshot version to 1.21.11-2.0.11-SNAPSHOT.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants