Interface ToponlineModule

All Superinterfaces:
org.incendo.cloud.execution.CommandExecutionHandler<FPlayer>, ModuleCommand, ModuleLocalization, ModuleSimple

public interface ToponlineModule extends ModuleCommand
The /toponline command, which ranks players by time played.
  • Method Details

    • config

      Description copied from interface: ModuleCommand
      The config section for this command, which also holds its aliases.
      Specified by:
      config in interface ModuleCommand
      Specified by:
      config in interface ModuleSimple
      Returns:
      the command settings
    • permission

      Description copied from interface: ModuleSimple
      The permission that gates this module.
      Specified by:
      permission in interface ModuleSimple
      Returns:
      the permission
    • localization

      Localization.Command.Toponline localization(FPlayer fPlayer)
      Description copied from interface: ModuleLocalization
      The localization section for a player, picked from their chosen language.
      Specified by:
      localization in interface ModuleLocalization
      Parameters:
      fPlayer - the player the text is for
      Returns:
      the localization settings
    • addTag

      MessageContext addTag(MessageContext messageContext)
      Registers the tags that render entries of the ranking.
      Parameters:
      messageContext - the message being formatted
      Returns:
      the context with the tags added
    • getPlayerByPosition

      Optional<FPlayer> getPlayerByPosition(String rawPosition)
      The player at a place in the ranking.
      Parameters:
      rawPosition - the place, as written in the message
      Returns:
      the player, or empty if the place is out of range or not a number
    • getPlayerByPosition

      Optional<FPlayer> getPlayerByPosition(int position)
      The player at a place in the ranking.
      Parameters:
      position - the place, starting at 1
      Returns:
      the player, or empty if the place is out of range