Class 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 java.lang.Class<C> commandSenderType, @NonNull java.util.function.Function<@NonNull cloud.commandframework.CommandTree<C>,​@NonNull cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator, @NonNull java.util.function.Function<@NonNull com.velocitypowered.api.command.CommandSource,​@NonNull C> commandSenderMapper, @NonNull java.util.function.Function<@NonNull C,​@NonNull com.velocitypowered.api.command.CommandSource> backwardsCommandSenderMapper)
      Create a new child injection module
    • Method Summary

      Modifier and Type Method Description
      protected void configure()  
      • 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, requestStaticInjection, requireBinding, requireBinding
      • Methods inherited from class java.lang.Object

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

      • CloudInjectionModule

        public CloudInjectionModule​(@NonNull java.lang.Class<C> commandSenderType,
                                    @NonNull java.util.function.Function<@NonNull cloud.commandframework.CommandTree<C>,​@NonNull cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator,
                                    @NonNull java.util.function.Function<@NonNull com.velocitypowered.api.command.CommandSource,​@NonNull C> commandSenderMapper,
                                    @NonNull java.util.function.Function<@NonNull C,​@NonNull com.velocitypowered.api.command.CommandSource> backwardsCommandSenderMapper)
        Create a new child injection module
        Parameters:
        commandSenderType - Your command sender type
        commandExecutionCoordinator - Command execution coordinator
        commandSenderMapper - Mapper from command source to the custom command sender type
        backwardsCommandSenderMapper - Mapper from the custom command sender type to a velocity command source
    • Method Detail

      • configure

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