Class MineDownStringifier

java.lang.Object
de.themoep.minedown.adventure.MineDownStringifier

public class MineDownStringifier
extends java.lang.Object
  • Constructor Details

    • MineDownStringifier

      public MineDownStringifier()
  • Method Details

    • stringify

      public java.lang.String stringify​(java.util.List<net.kyori.adventure.text.Component> components)
      Create a MineDown string from a component message
      Parameters:
      components - The components to generate a MineDown string from
      Returns:
      The MineDown string
    • stringify

      public java.lang.String stringify​(net.kyori.adventure.text.Component component)
      Create a MineDown string from a component message
      Parameters:
      component - The component to generate a MineDown string from
      Returns:
      The MineDown string
    • copy

      public MineDownStringifier copy()
      Copy all the parser's setting to a new instance
      Returns:
      The new parser instance with all settings copied
    • copy

      Copy all the parser's settings from another parser
      Parameters:
      from - The stringifier to copy from
      Returns:
      This stringifier's instance
    • useLegacyColors

      public boolean useLegacyColors()
      Get whether or not to use legacy color codes
      Returns:
      whether or not to use legacy color codes when possible (Default: true)
    • useLegacyColors

      public MineDownStringifier useLegacyColors​(boolean useLegacyColors)
      Set whether or not to use legacy color codes
      Parameters:
      useLegacyColors - Whether or not to use legacy colors (Default: true)
      Returns:
      The MineDownStringifier instance
    • useLegacyFormatting

      public boolean useLegacyFormatting()
      Get whether or not to translate legacy formatting codes over MineDown ones
      Returns:
      whether or not to use legacy formatting codes (Default: false)
    • useLegacyFormatting

      public MineDownStringifier useLegacyFormatting​(boolean useLegacyFormatting)
      Set whether or not to translate legacy formatting codes over MineDown ones
      Parameters:
      useLegacyFormatting - Whether or not to translate legacy formatting codes (Default: false)
      Returns:
      The MineDownStringifier instance
    • preferSimpleEvents

      public boolean preferSimpleEvents()
      Get whether or not to use simple event definitions or specific ones (Default: true)
      Returns:
      whether or not to use simple events
    • preferSimpleEvents

      public MineDownStringifier preferSimpleEvents​(boolean preferSimpleEvents)
      Set whether or not to use simple event definitions or specific ones
      Parameters:
      preferSimpleEvents - Whether or not to prefer simple events (Default: true)
      Returns:
      The MineDownStringifier instance
    • colorInEventDefinition

      public boolean colorInEventDefinition()
      Get whether or not to put colors in event definitions or use inline color definitions
      Returns:
      whether or not to put colors in event definitions (Default: false)
    • colorInEventDefinition

      public MineDownStringifier colorInEventDefinition​(boolean colorInEventDefinition)
      Set whether or not to put colors in event definitions or use inline color definitions
      Parameters:
      colorInEventDefinition - Whether or not to put colors in event definitions (Default: false)
      Returns:
      The MineDownStringifier instance
    • formattingInEventDefinition

      public boolean formattingInEventDefinition()
      Get whether or not to put formatting in event definitions or use inline formatting definitions
      Returns:
      whether or not to put formatting in event definitions (Default: false)
    • formattingInEventDefinition

      public MineDownStringifier formattingInEventDefinition​(boolean formattingInEventDefinition)
      Set whether or not to put formatting in event definitions or use inline formatting definitions
      Parameters:
      formattingInEventDefinition - Whether or not to put formatting in event definitions (Default: false)
      Returns:
      The MineDownStringifier instance
    • colorChar

      public char colorChar()
      Get the character to use as a special color code. (Default: ampersand &)
      Returns:
      the color character
    • colorChar

      public MineDownStringifier colorChar​(char colorChar)
      Set the character to use as a special color code.
      Parameters:
      colorChar - The character to be used as the color char (for legacy and MineDown colors, default: ampersand &)
      Returns:
      The MineDownStringifier instance