Package de.themoep.minedown.adventure
Class MineDownStringifier
java.lang.Object
de.themoep.minedown.adventure.MineDownStringifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchar
Get the character to use as a special color code.colorChar
(char colorChar) Set the character to use as a special color code.boolean
Get whether or not to put colors in event definitions or use inline color definitionscolorInEventDefinition
(boolean colorInEventDefinition) Set whether or not to put colors in event definitions or use inline color definitionscopy()
Copy all the parser's setting to a new instancecopy
(MineDownStringifier from) Copy all the parser's settings from another parserboolean
Get whether or not to put formatting in event definitions or use inline formatting definitionsformattingInEventDefinition
(boolean formattingInEventDefinition) Set whether or not to put formatting in event definitions or use inline formatting definitionsboolean
Get whether or not to use simple event definitions or specific ones (Default: true)preferSimpleEvents
(boolean preferSimpleEvents) Set whether or not to use simple event definitions or specific onesCreate aMineDown
string from a component messagestringify
(net.kyori.adventure.text.Component component) Create aMineDown
string from a component messageboolean
Get whether or not to use legacy color codesuseLegacyColors
(boolean useLegacyColors) Set whether or not to use legacy color codesboolean
Get whether or not to translate legacy formatting codes over MineDown onesuseLegacyFormatting
(boolean useLegacyFormatting) Set whether or not to translate legacy formatting codes over MineDown ones
-
Constructor Details
-
MineDownStringifier
public MineDownStringifier()
-
-
Method Details
-
stringify
Create aMineDown
string from a component message- Parameters:
components
- The components to generate a MineDown string from- Returns:
- The MineDown string
-
stringify
Create aMineDown
string from a component message- Parameters:
component
- The component to generate a MineDown string from- Returns:
- The MineDown string
-
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
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
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
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
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
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
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
-