Interface TranslateModule

All Superinterfaces:
ModuleLocalization, ModuleSimple

public interface TranslateModule extends ModuleLocalization
Lets a reader translate someone else's message by clicking it.
  • Method Details

    • config

      Description copied from interface: ModuleSimple
      The config section this module reads its settings from.
      Specified by:
      config in interface ModuleSimple
      Returns:
      the settings
    • permission

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

      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
    • saveMessage

      UUID saveMessage(String message)
      Stores a message so a reader can translate it later by clicking.
      Parameters:
      message - the text
      Returns:
      the id the translate button carries
    • addTag

      MessageContext addTag(StringMessageContext messageContext)
      Registers the tag that draws the translate button.
      Parameters:
      messageContext - the message being formatted
      Returns:
      the context with the tag added
    • getMessage

      @Nullable String getMessage(String stringUUID)
      The stored text behind a translate button.
      Parameters:
      stringUUID - the message id, as written in the button
      Returns:
      the text, or an empty string if it has expired
    • getMessage

      @Nullable String getMessage(UUID uuid)
      The stored text behind a translate button.
      Parameters:
      uuid - the message id
      Returns:
      the text, or an empty string if it has expired