Class Parser


  • public class Parser
    extends java.lang.Object
    Parser for parsing drawextinfo messages received from a Crossfire server to update a Buffer instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      Parser()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void parse​(@NotNull java.lang.CharSequence text, @Nullable java.awt.Color defaultColor, @NotNull Buffer buffer)
      Parses a text message.
      void parseWithoutMediaTags​(@NotNull java.lang.CharSequence text, @NotNull java.awt.Color color, @NotNull Buffer buffer)
      Parses a plain text message without media tags.
      static @NotNull java.lang.String toString​(@NotNull java.awt.Color color)
      Returns the string representation for a color.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Parser

        public Parser()
    • Method Detail

      • parse

        public void parse​(@NotNull
                          @NotNull java.lang.CharSequence text,
                          @Nullable
                          @Nullable java.awt.Color defaultColor,
                          @NotNull
                          @NotNull Buffer buffer)
        Parses a text message.
        Parameters:
        text - the text message to parse
        defaultColor - the default color to use
        buffer - the buffer to update
      • parseWithoutMediaTags

        public void parseWithoutMediaTags​(@NotNull
                                          @NotNull java.lang.CharSequence text,
                                          @NotNull
                                          @NotNull java.awt.Color color,
                                          @NotNull
                                          @NotNull Buffer buffer)
        Parses a plain text message without media tags.
        Parameters:
        text - the text message to parse
        color - the color to use
        buffer - the buffer to update
      • toString

        @NotNull
        public static @NotNull java.lang.String toString​(@NotNull
                                                         @NotNull java.awt.Color color)
        Returns the string representation for a color.
        Parameters:
        color - the color to convert
        Returns:
        the string representation