Interface ModerationListSender


public interface ModerationListSender
Renders the paged output of the punishment list commands, such as banlist and mutelist.
  • 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 run
      fPlayer - who ran it
      localization - picks the wording for the reader
      commandContext - the parsed arguments
      type - the punishment type to list
      firstArgumentIndex - where this command's own arguments start
      perPage - how many entries fit on a page
      nextPageCommand - the command run by the next-page button
      unmoderationCommand - 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 run
      commandContext - the parsed arguments
      startIndex - where this command's own arguments start
      Returns:
      the target and page, or empty if the arguments do not make sense