Promotion background
Easter Season IS HERE!
10% off limited time offer!
Ends in
00
H
00
M
00
S
limited time offer SAVE 10% NOW →
Packages com.phoenixplugins.sdk.api text
com.phoenixplugins.sdk.api.text

Interface Text

  • All Known Implementing Classes:
    PlainText, ReplacementText, TextCompound


    public interface Text
    Represents a text component that can be used for various purposes such as messages, inventories, etc. Provides methods for creating, appending, and modifying components as well as retrieving their plain text representation.
    • Method Summary

      Modifier and Type Method and Description
      default Text append(Text component)
      Appends another component to this one, producing a new combined component.
      default Text append(Text other, boolean withSpace)
      Appends another component to this one.
      static Text concat(String first, Text second) 
      static Text empty() 
      static Text join(String delimiter, Text... components)
      Joins an array of components into a single Text, inserting the specified delimiter between each element.
      static TextCompound plain(List<?> text) 
      static Text plain(Object text)
      Creates a new plain text component with the given text.
      default Text replaceText(String regex, Object text) 
      default Text replaceText(String regex, Text component)
      Replaces all substrings of this component's text that match the given regular expression with the specified replacement component.
      String toPlainText() 
    • Method Detail

      • concat

        static Text concat(String first,
                           Text second)
      • empty

        static Text empty()
      • plain

        static Text plain(Object text)
        Creates a new plain text component with the given text.
        Parameters:
        text - the text content of the component
        Returns:
        a new Text instance containing the specified plain text
      • join

        static Text join(String delimiter,
                         Text... components)
        Joins an array of components into a single Text, inserting the specified delimiter between each element.

        This method preserves the original components' structure and formatting, so it is compatible with MiniMessage or any other Text-based system.

        Parameters:
        delimiter - the text to insert between each component
        components - the array of components to join
        Returns:
        a new Text representing all components joined with the delimiter or an empty Text if the array is null or empty
      • append

        default Text append(Text component)
        Appends another component to this one, producing a new combined component.
        Parameters:
        component - the component to append
        Returns:
        a new Text instance with the appended content
      • append

        default Text append(Text other,
                            boolean withSpace)
        Appends another component to this one.
        Parameters:
        other - the component to append
        withSpace - if true, a space will be inserted before appending
        Returns:
        a new component representing the combined result
      • replaceText

        default Text replaceText(String regex,
                                 Text component)
        Replaces all substrings of this component's text that match the given regular expression with the specified replacement component.
        Parameters:
        regex - the regular expression to match
        component - the component to replace matches with
        Returns:
        a new Text instance with the replacements applied
      • replaceText

        default Text replaceText(String regex,
                                 Object text)
      • toPlainText

        String toPlainText()
Last updated about 4 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy
This site uses cookies to personalize content, enhance your experience. By continuing, you agree to our cookie use. Learn more