Interface Caption

All Known Subinterfaces:
NamespacedCaption
All Known Implementing Classes:
CommandCategory, StaticCaption, TranslatableCaption

public interface Caption
Any message that can be sent to a player, the console, etc.
  • Method Details

    • getComponent

      Get the message that should be sent to the recipient
      Parameters:
      localeHolder - Locale holder
      Returns:
      Message
    • toComponent

      @NonNull net.kyori.adventure.text.Component toComponent(@NonNull LocaleHolder localeHolder)
      Get the Adventure ComponentLike for this caption
      Parameters:
      localeHolder - Locale holder
      Returns:
      ComponentLike
      Since:
      7.0.0
    • toComponent

      @NonNull net.kyori.adventure.text.Component toComponent(@NonNull LocaleHolder localeHolder, @NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver @NonNull ... tagResolvers)
      Get the Adventure ComponentLike for this caption while applying custom TagResolver (apart from the default core.prefix)
      Parameters:
      localeHolder - Local holder
      tagResolvers - custom tag resolvers to replace placeholders / parameters
      Returns:
      ComponentLike
      Since:
      7.5.4
    • toString

      Overrides:
      toString in class Object