Class KyoriMessageSender
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.senders.KyoriMessageSender
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionKyoriMessageSender(MessageCooldownMap messageCooldownMap, net.kyori.adventure.text.minimessage.MiniMessage miniMessage, net.kyori.adventure.platform.bukkit.BukkitAudiences audiences, SoundRepository sounds) Constructs aKyoriMessageSenderwith the specified cooldown map for managing message repeat suppression. -
Method Summary
Modifier and TypeMethodDescriptionvoidsend(Recipient.Sendable recipient, FinalMessageRecord messageRecord) Sends a chat message to the specified recipient if the message is enabled and contains content.
-
Constructor Details
-
KyoriMessageSender
public KyoriMessageSender(MessageCooldownMap messageCooldownMap, net.kyori.adventure.text.minimessage.MiniMessage miniMessage, net.kyori.adventure.platform.bukkit.BukkitAudiences audiences, SoundRepository sounds) Constructs aKyoriMessageSenderwith the specified cooldown map for managing message repeat suppression.- Parameters:
messageCooldownMap- the cooldown map used to track and store message cooldowns
-
-
Method Details
-
send
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.
-