-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add permissions to velocity #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Pull Request
Description
Adds permissions to the Velocity player plugin.
Type of Change
Related Issues
None
Testing
Checklist