Skip to content

Conversation

@lusu007
Copy link
Contributor

@lusu007 lusu007 commented Jan 24, 2026

Pull Request

Description

Adds permissions to the Velocity player plugin.

Type of Change

  • πŸ› Bug fix
  • ✨ New feature
  • πŸ’₯ Breaking change
  • ♻️ Refactoring
  • πŸ“š Documentation
  • πŸ”§ Chore

Related Issues

None

Testing

  • Unit tests pass
  • Manual testing completed
  • New tests added for new functionality

Checklist

  • I have performed a self-review of my own code
  • Tests have been added/updated and pass (if needed)
  • Documentation has been updated (if needed)

@lusu007 lusu007 requested a review from ItsKev January 24, 2026 00:06
@lusu007 lusu007 self-assigned this Jan 24, 2026
@lusu007 lusu007 marked this pull request as ready for review January 26, 2026 15:37
Copilot AI review requested due to automatic review settings January 26, 2026 15:37
Copy link

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

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 /permissions command with subcommands for player and group management
  • Refactored package structure (moved presence-related classes to gg.grounds.presence package)
  • Created BaseGrpcClient base 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.

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