Class PollModule
java.lang.Object
net.flectone.pulse.module.command.poll.PollModule
- All Implemented Interfaces:
ModuleCommand<Localization.Command.Poll>, ModuleLocalization<Localization.Command.Poll>, ModuleSimple, org.incendo.cloud.execution.CommandExecutionHandler<FPlayer>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
org.incendo.cloud.execution.CommandExecutionHandler.FutureCommandExecutionHandler<C> -
Constructor Summary
ConstructorsConstructorDescriptionPollModule(FileFacade fileFacade, FPlayerService fPlayerService, ProxySender proxySender, TaskScheduler taskScheduler, CommandParserProvider commandParserProvider, MessagePipeline messagePipeline, MessageDispatcher messageDispatcher, ModuleController moduleController, ModuleCommandController commandModuleController, ComponentSerializer componentSerializer, FLogger fLogger, ProxyRegistry proxyRegistry, ListenerRegistry listenerRegistry, SocialService socialService) -
Method Summary
Modifier and TypeMethodDescriptionconfig()voidcreatePoll(FPlayer fPlayer, String title, boolean multipleValue, long endTimeValue, long repeatTimeValue, List<String> answers) voidvoidexecuteVote(FPlayer fPlayer, org.incendo.cloud.context.CommandContext<FPlayer> commandContext) localization(FPlayer fPlayer) name()voidvoidonEnable()com.google.common.collect.ImmutableSet.Builder<PermissionSetting> resolvePollFormat(FEntity fPlayer, Poll poll, PollModule.Status status) resolveVote(int voteType, int answerID, int pollID, int count) voidsaveAndUpdateLast(Poll poll) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
executeFutureMethods inherited from interface ModuleCommand
executeMethods inherited from interface ModuleLocalization
cooldown, cooldownOrThrow, localization, sound, soundOrThrowMethods inherited from interface ModuleSimple
childrenBuilder, disablePredicate
-
Constructor Details
-
PollModule
@Inject public PollModule(FileFacade fileFacade, FPlayerService fPlayerService, ProxySender proxySender, TaskScheduler taskScheduler, CommandParserProvider commandParserProvider, MessagePipeline messagePipeline, MessageDispatcher messageDispatcher, ModuleController moduleController, ModuleCommandController commandModuleController, ComponentSerializer componentSerializer, FLogger fLogger, ProxyRegistry proxyRegistry, ListenerRegistry listenerRegistry, SocialService socialService)
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceModuleSimple
-
permissionBuilder
- Specified by:
permissionBuilderin interfaceModuleLocalization<Localization.Command.Poll>- Specified by:
permissionBuilderin interfaceModuleSimple
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceModuleSimple
-
executeVote
-
execute
public void execute(FPlayer fPlayer, org.incendo.cloud.context.CommandContext<FPlayer> commandContext) - Specified by:
executein interfaceModuleCommand<Localization.Command.Poll>
-
name
- Specified by:
namein interfaceModuleSimple
-
config
- Specified by:
configin interfaceModuleCommand<Localization.Command.Poll>- Specified by:
configin interfaceModuleSimple
-
permission
- Specified by:
permissionin interfaceModuleSimple
-
localization
- Specified by:
localizationin interfaceModuleLocalization<Localization.Command.Poll>
-
createPoll
-
saveAndUpdateLast
-
vote
-
resolveVote
public Function<Localization.Command.Poll, String> resolveVote(int voteType, int answerID, int pollID, int count) -
resolvePollFormat
public Function<Localization.Command.Poll, String> resolvePollFormat(FEntity fPlayer, Poll poll, PollModule.Status status)
-