java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.senders.KyoriMessageSender
All Implemented Interfaces:
Sender

public final class KyoriMessageSender extends Object implements Sender
Sends chat messages to a Recipient.Sendable based on the contents of a FinalMessageRecord.

This implementation handles:

  • Kyori Adventure style formatting tags
  • Empty or disabled messages gracefully
  • CooldownMap tracking via a MessageCooldownMap

It is typically used to deliver the main message body, rather than titles or subtitles.

See Also:
  • Constructor Details

    • KyoriMessageSender

      public KyoriMessageSender(MessageCooldownMap messageCooldownMap, net.kyori.adventure.text.minimessage.MiniMessage miniMessage, net.kyori.adventure.platform.bukkit.BukkitAudiences audiences, SoundRepository sounds)
      Constructs a KyoriMessageSender with the specified cooldown map for managing message repeat suppression.
      Parameters:
      messageCooldownMap - the cooldown map used to track and store message cooldowns
  • Method Details

    • send

      public void send(Recipient.Sendable recipient, FinalMessageRecord messageRecord)
      Sends a chat message to the specified recipient if the message is enabled and contains content. Cooldowns are recorded after sending.

      The message text is color-translated using '&' codes.

      Specified by:
      send in interface Sender
      Parameters:
      recipient - the message recipient
      messageRecord - the final message record with resolved string content