Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive permissions functionality to the Velocity player plugin, integrating a permissions system with gRPC-based services, local caching, real-time event streaming, and command-line management tools.
Changes:
- Added permissions services layer with gRPC client integration for permissions management and event streaming
- Implemented local permissions caching with automatic refresh and delta-based updates
- Added comprehensive
/permissionscommand with subcommands for player and group management - Refactored package structure (moved presence-related classes to
gg.grounds.presencepackage) - Created
BaseGrpcClientbase class to consolidate gRPC client lifecycle management
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
velocity/src/main/kotlin/gg/grounds/presence/listener/PlayerConnectionListener.kt |
Updated package imports to reflect new package structure |
velocity/src/main/kotlin/gg/grounds/presence/PlayerPresenceService.kt |
Removed now-unnecessary imports (classes moved to same package) |
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsService.kt |
New service for fetching player permissions and checking permissions |
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsEventsSubscriber.kt |
New streaming service for real-time permissions change events with automatic reconnection |
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsAdminService.kt |
New admin service for managing groups and permissions |
velocity/src/main/kotlin/gg/grounds/permissions/listener/PermissionsSetupListener.kt |
Integrates permissions cache with Velocity's permission system |
velocity/src/main/kotlin/gg/grounds/permissions/listener/PermissionsConnectionListener.kt |
Manages permissions cache on player join/disconnect |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsSuggestions.kt |
Provides command auto-completion with cached group names |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsPlayerCommandHandler.kt |
Handles player-specific permission commands |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsGroupCommandHandler.kt |
Handles group management commands |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandParser.kt |
Parses command arguments including duration strings |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandMessages.kt |
Provides help and usage messages for permissions commands |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandContext.kt |
Shared context for permission command handlers |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandAccess.kt |
Controls access to permission commands |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommand.kt |
Main permissions command registration using Brigadier |
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsAdminCommandHandler.kt |
Handles admin-level permission commands |
velocity/src/main/kotlin/gg/grounds/permissions/PermissionsCache.kt |
Thread-safe cache for player permissions with delta updates |
velocity/src/main/kotlin/gg/grounds/permissions/CombinedPermissionsProvider.kt |
Combines cached permissions with fallback provider |
velocity/src/main/kotlin/gg/grounds/config/EnvironmentConfig.kt |
New configuration class for environment variable management |
velocity/src/main/kotlin/gg/grounds/GroundsPluginPlayer.kt |
Wires up permissions services, commands, and listeners |
velocity/build.gradle.kts |
Added grpc-stub dependency |
common/src/main/kotlin/gg/grounds/presence/PlayerLoginResult.kt |
Moved to presence package |
common/src/main/kotlin/gg/grounds/presence/GrpcPlayerPresenceClient.kt |
Refactored to extend BaseGrpcClient |
common/src/main/kotlin/gg/grounds/permissions/GrpcPermissionsEventsClient.kt |
New gRPC client for permissions event streaming |
common/src/main/kotlin/gg/grounds/permissions/GrpcPermissionsClient.kt |
New gRPC client for permissions service |
common/src/main/kotlin/gg/grounds/permissions/GrpcPermissionsAdminClient.kt |
New gRPC client for permissions admin service |
common/src/main/kotlin/gg/grounds/grpc/BaseGrpcClient.kt |
New base class for gRPC clients with standardized lifecycle |
common/build.gradle.kts |
Added permissions protobuf dependency |
README.md |
Added documentation for permissions configuration and commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsEventsSubscriber.kt
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsService.kt
Outdated
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsService.kt
Outdated
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandAccess.kt
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/permissions/services/PermissionsAdminService.kt
Outdated
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/permissions/commands/PermissionsCommandParser.kt
Show resolved
Hide resolved
19cec5d to
be90b5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adds permissions to the Velocity player plugin.
Type of Change
Related Issues
None
Testing
Checklist