Class CloudInjectionModule<C>

java.lang.Object
com.google.inject.AbstractModule
org.incendo.cloud.velocity.CloudInjectionModule<C>
Type Parameters:
C - Command sender type
All Implemented Interfaces:
com.google.inject.Module

public final class CloudInjectionModule<C> extends com.google.inject.AbstractModule
Injection module that allows for VelocityCommandManager to be injectable
Since:
1.1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    CloudInjectionModule(@NonNull Class<C> commandSenderType, @NonNull ExecutionCoordinator<C> executionCoordinator, @NonNull SenderMapper<com.velocitypowered.api.command.CommandSource,C> senderMapper)
    Create a new child injection module
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    static @NonNull CloudInjectionModule<@NonNull com.velocitypowered.api.command.CommandSource>
    createNative(@NonNull ExecutionCoordinator<com.velocitypowered.api.command.CommandSource> commandExecutionCoordinator)
    Create a new child injection module using Velocity's CommandSource as the sender type.

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

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

    • CloudInjectionModule

      public CloudInjectionModule(@NonNull Class<C> commandSenderType, @NonNull ExecutionCoordinator<C> executionCoordinator, @NonNull SenderMapper<com.velocitypowered.api.command.CommandSource,C> senderMapper)
      Create a new child injection module
      Parameters:
      commandSenderType - Your command sender type
      executionCoordinator - Command execution coordinator
      senderMapper - Mapper from command source to the custom command sender type
  • Method Details

    • createNative

      public static @NonNull CloudInjectionModule<@NonNull com.velocitypowered.api.command.CommandSource> createNative(@NonNull ExecutionCoordinator<com.velocitypowered.api.command.CommandSource> commandExecutionCoordinator)
      Create a new child injection module using Velocity's CommandSource as the sender type.
      Parameters:
      commandExecutionCoordinator - Command execution coordinator
      Returns:
      new injection module
      Since:
      1.5.0
    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule