Class SimpleMessage

java.lang.Object
de.oliver.fancylib.translations.message.Message
de.oliver.fancylib.translations.message.SimpleMessage

public class SimpleMessage extends Message
  • Constructor Details

  • Method Details

    • replace

      public SimpleMessage replace(String placeholder, String replacement)
      Description copied from class: Message
      Replaces a placeholder in the message
      Specified by:
      replace in class Message
      Parameters:
      placeholder - the placeholder to replace
      replacement - the replacement
      Returns:
      this message
    • replaceStripped

      public Message replaceStripped(String placeholder, String replacement)
      Description copied from class: Message
      Replaces a placeholder in the message, all known tags are stripped from the replacement
      Specified by:
      replaceStripped in class Message
      Parameters:
      placeholder - the placeholder to replace
      replacement - the replacement
      Returns:
      this message
    • withPrefix

      public SimpleMessage withPrefix()
      Description copied from class: Message
      Adds the prefix to the message
      Specified by:
      withPrefix in class Message
      Returns:
      this message
    • primary

      public SimpleMessage primary()
      Description copied from class: Message
      Adds the primary color to the message
      Specified by:
      primary in class Message
      Returns:
      this message
    • secondary

      public SimpleMessage secondary()
      Description copied from class: Message
      Adds the secondary color to the message
      Specified by:
      secondary in class Message
      Returns:
      this message
    • success

      public SimpleMessage success()
      Description copied from class: Message
      Adds the success color to the message
      Specified by:
      success in class Message
      Returns:
      this message
    • warning

      public SimpleMessage warning()
      Description copied from class: Message
      Adds the warning color to the message
      Specified by:
      warning in class Message
      Returns:
      this message
    • error

      public SimpleMessage error()
      Description copied from class: Message
      Adds the error color to the message
      Specified by:
      error in class Message
      Returns:
      this message
    • applyCustomPlaceholders

      public SimpleMessage applyCustomPlaceholders()
      Description copied from class: Message
      Applies custom placeholders to the message
      Specified by:
      applyCustomPlaceholders in class Message
      Returns:
      this message
    • buildComponent

      public net.kyori.adventure.text.Component buildComponent()
      Description copied from class: Message
      Builds the message as a component
      Specified by:
      buildComponent in class Message
      Returns:
      the built component
    • copy

      public Message copy()
      Description copied from class: Message
      Copies the message
      Specified by:
      copy in class Message
      Returns:
      the copied message
    • build

      public String build()
    • actionbar

      public void actionbar(org.bukkit.entity.Player receiver)
      Overrides:
      actionbar in class Message
    • getMessage

      public String getMessage()