Package cloud.commandframework.sponge7
Class CloudInjectionModule<C>
java.lang.Object
com.google.inject.AbstractModule
cloud.commandframework.sponge7.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
SpongeCommandManager
to be injectable- Since:
- 1.1.0
-
Constructor Summary
ConstructorDescriptionCloudInjectionModule
(@NonNull Class<C> commandSenderType, @NonNull Function<@NonNull cloud.commandframework.CommandTree<C>, @NonNull cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator, @NonNull Function<@NonNull org.spongepowered.api.command.CommandSource, @NonNull C> commandSenderMapper, @NonNull Function<@NonNull C, @NonNull org.spongepowered.api.command.CommandSource> backwardsCommandSenderMapper) Create a new child injection module -
Method Summary
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
-
Constructor Details
-
CloudInjectionModule
public CloudInjectionModule(@NonNull Class<C> commandSenderType, @NonNull Function<@NonNull cloud.commandframework.CommandTree<C>, @NonNull cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator, @NonNull Function<@NonNull org.spongepowered.api.command.CommandSource, @NonNull C> commandSenderMapper, @NonNull Function<@NonNull C, @NonNull org.spongepowered.api.command.CommandSource> backwardsCommandSenderMapper) Create a new child injection module- Parameters:
commandSenderType
- Your command sender typecommandExecutionCoordinator
- Command execution coordinatorcommandSenderMapper
- Mapper from command source to the custom command sender typebackwardsCommandSenderMapper
- Mapper from the custom command sender type to a velocity command source
-
-
Method Details
-
configure
protected void configure()- Specified by:
configure
in classcom.google.inject.AbstractModule
-