Interface ModerationListSender
public interface ModerationListSender
Renders the paged output of the punishment list commands, such as banlist and mutelist.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe arguments a list command was called with. -
Method Summary
Modifier and TypeMethodDescriptiongetListArgument(ModuleCommand command, org.incendo.cloud.context.CommandContext<FPlayer> commandContext, int startIndex) Reads the optional player and page number off the command line.voidsend(ModuleCommand module, FPlayer fPlayer, Function<FPlayer, ModerationListLocalizationSetting> localization, org.incendo.cloud.context.CommandContext<FPlayer> commandContext, Moderation.Type type, int firstArgumentIndex, int perPage, String nextPageCommand, Function<FPlayer, String> unmoderationCommand) Sends one page of punishments to the player who asked for it.
-
Method Details
-
send
void send(ModuleCommand module, FPlayer fPlayer, Function<FPlayer, ModerationListLocalizationSetting> localization, org.incendo.cloud.context.CommandContext<FPlayer> commandContext, Moderation.Type type, int firstArgumentIndex, int perPage, String nextPageCommand, Function<FPlayer, String> unmoderationCommand) Sends one page of punishments to the player who asked for it.- Parameters:
module- the command that was runfPlayer- who ran itlocalization- picks the wording for the readercommandContext- the parsed argumentstype- the punishment type to listfirstArgumentIndex- where this command's own arguments startperPage- how many entries fit on a pagenextPageCommand- the command run by the next-page buttonunmoderationCommand- the command run by the revoke button
-
getListArgument
Optional<ModerationListSender.ListArgument> getListArgument(ModuleCommand command, org.incendo.cloud.context.CommandContext<FPlayer> commandContext, int startIndex) Reads the optional player and page number off the command line.- Parameters:
command- the command that was runcommandContext- the parsed argumentsstartIndex- where this command's own arguments start- Returns:
- the target and page, or empty if the arguments do not make sense
-