Class CommandServiceGrpc.CommandServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<CommandServiceGrpc.CommandServiceStub>
io.grpc.stub.AbstractAsyncStub<CommandServiceGrpc.CommandServiceStub>
com.soulfiremc.grpc.generated.CommandServiceGrpc.CommandServiceStub
Enclosing class:
CommandServiceGrpc

public static final class CommandServiceGrpc.CommandServiceStub extends io.grpc.stub.AbstractAsyncStub<CommandServiceGrpc.CommandServiceStub>
A stub to allow clients to do asynchronous rpc calls to service CommandService.
Service for executing server commands and retrieving tab-completion suggestions.
Commands are executed using the Brigadier command framework and support various
operations including bot control, pathfinding, inventory management, and administration.
All operations require appropriate permissions based on the specified command scope.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    executeCommand(CommandRequest request, io.grpc.stub.StreamObserver<CommandResponse> responseObserver)
    Executes a command string within the specified scope.
    void
    tabCompleteCommand(CommandCompletionRequest request, io.grpc.stub.StreamObserver<CommandCompletionResponse> responseObserver)
    Retrieves tab-completion suggestions for a partial command.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected CommandServiceGrpc.CommandServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<CommandServiceGrpc.CommandServiceStub>
    • executeCommand

      public void executeCommand(CommandRequest request, io.grpc.stub.StreamObserver<CommandResponse> responseObserver)
      Executes a command string within the specified scope.
      The command is parsed and executed using the Brigadier command dispatcher.
      Permission requirements depend on the scope:
      - Global scope: Requires GLOBAL_COMMAND_EXECUTION permission
      - Instance scope: Requires INSTANCE_COMMAND_EXECUTION for the instance
      - Bot scope: Requires INSTANCE_COMMAND_EXECUTION for the parent instance
      Returns:
      - CommandResponse with the command's exit code
      Errors:
      - INVALID_ARGUMENT: If the scope is not set
      - PERMISSION_DENIED: If the user lacks required permissions
      - INTERNAL: If an unexpected error occurs during execution
      
    • tabCompleteCommand

      public void tabCompleteCommand(CommandCompletionRequest request, io.grpc.stub.StreamObserver<CommandCompletionResponse> responseObserver)
      Retrieves tab-completion suggestions for a partial command.
      Uses Brigadier's completion system to generate context-aware suggestions
      based on the command structure and current cursor position.
      Permission requirements depend on the scope (same as ExecuteCommand).
      Returns:
      - CommandCompletionResponse with a list of possible completions
      Errors:
      - INVALID_ARGUMENT: If the scope is not set
      - PERMISSION_DENIED: If the user lacks required permissions
      - INTERNAL: If an unexpected error occurs during completion