Interface ReplacementModule

All Superinterfaces:
ModuleLocalization, ModuleSimple

public interface ReplacementModule extends ModuleLocalization
Rewrites configured fragments of a message, turning links and emotes into rich content.
  • 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
    • format

      MessageContext format(MessageContext messageContext)
      Rewrites the configured fragments of the message.
      Parameters:
      messageContext - the message being formatted
      Returns:
      the formatted context
    • addTags

      MessageContext addTags(MessageContext messageContext)
      Registers the tags that expand the configured replacements.
      Parameters:
      messageContext - the message being formatted
      Returns:
      the context with the tags added
    • createImageComponent

      net.kyori.adventure.text.Component createImageComponent(String link)
      Renders a remote image as a component, downloading it on the first request. An image that cannot be downloaded or rendered comes back empty.
      Parameters:
      link - the image url
      Returns:
      the rendered image