java.lang.Object
de.oliver.fancylib.translations.message.Message
Direct Known Subclasses:
MultiMessage, SimpleMessage

public abstract class Message extends Object
  • Field Details

    • config

      protected final TextConfig config
    • tagResolverBuilder

      protected net.kyori.adventure.text.minimessage.tag.resolver.TagResolver.Builder tagResolverBuilder
  • Constructor Details

  • Method Details

    • addTagResolver

      public Message addTagResolver(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver resolver)
    • applyColorPlaceholders

      protected void applyColorPlaceholders()
    • replace

      public abstract Message replace(String placeholder, String replacement)
      Replaces a placeholder in the message
      Parameters:
      placeholder - the placeholder to replace
      replacement - the replacement
      Returns:
      this message
    • withPrefix

      public abstract Message withPrefix()
      Adds the prefix to the message
      Returns:
      this message
    • primary

      public abstract Message primary()
      Adds the primary color to the message
      Returns:
      this message
    • secondary

      public abstract Message secondary()
      Adds the secondary color to the message
      Returns:
      this message
    • success

      public abstract Message success()
      Adds the success color to the message
      Returns:
      this message
    • warning

      public abstract Message warning()
      Adds the warning color to the message
      Returns:
      this message
    • error

      public abstract Message error()
      Adds the error color to the message
      Returns:
      this message
    • applyCustomPlaceholders

      public abstract Message applyCustomPlaceholders()
      Applies custom placeholders to the message
      Returns:
      this message
    • buildComponent

      public abstract net.kyori.adventure.text.Component buildComponent()
      Builds the message as a component
      Returns:
      the built component
    • copy

      public abstract Message copy()
      Copies the message
      Returns:
      the copied message
    • send

      public void send(org.bukkit.command.CommandSender receiver)
    • actionbar

      public void actionbar(org.bukkit.entity.Player receiver)