Interface FormatModule

All Superinterfaces:
ModuleLocalization, ModuleSimple

public interface FormatModule extends ModuleLocalization
Groups the formatting steps applied to a message, and decides which MiniMessage tags the sender may use.
  • Method Details

    • config

      Message.Format 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

      Localization.Message.Format 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
    • addTags

      MessageContext addTags(MessageContext messageContext)
      Registers the tags every formatting module contributes.
      Parameters:
      messageContext - the message being formatted
      Returns:
      the context with the tags added
    • isCorrectTag

      boolean isCorrectTag(AdventureTag adventureTag, FEntity sender, boolean needPermission)
      Whether a sender may use a MiniMessage tag.
      Parameters:
      adventureTag - the tag
      sender - who wrote the message
      needPermission - whether the sender's permission is checked, or only the config
      Returns:
      true if the tag is allowed