Interface CharacterAndFormat
public sealed interface CharacterAndFormat
- Since:
- 4.14.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CharacterAndFormatCharacter and format pair representingNamedTextColor.AQUA.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.BLACK.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.BLUE.static final CharacterAndFormatCharacter and format pair representingTextDecoration.BOLD.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_AQUA.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_BLUE.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_GRAY.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_GREEN.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_PURPLE.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.DARK_RED.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.GOLD.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.GRAY.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.GREEN.static final CharacterAndFormatCharacter and format pair representingTextDecoration.ITALIC.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.LIGHT_PURPLE.static final CharacterAndFormatCharacter and format pair representingTextDecoration.OBFUSCATED.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.RED.static final CharacterAndFormatCharacter and format pair representingReset.INSTANCE.static final CharacterAndFormatCharacter and format pair representingTextDecoration.STRIKETHROUGH.static final CharacterAndFormatCharacter and format pair representingTextDecoration.UNDERLINED.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.WHITE.static final CharacterAndFormatCharacter and format pair representingNamedTextColor.YELLOW. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf thecharacter()is case-insensitive.charGets the character.static CharacterAndFormatcharacterAndFormat(char character, TextFormat format) Creates a new combination of a case-sensitivecharacterand aTextFormat.static CharacterAndFormatcharacterAndFormat(char character, TextFormat format, boolean caseInsensitive) Creates a new combination of acharacterand aTextFormat.static CharacterAndFormatcharacterAndReset(char character) Creates a new combination of a case-sensitivecharacterand the reset directive.static CharacterAndFormatcharacterAndReset(char character, boolean caseInsensitive) Creates a new combination of a case-sensitivecharacterand the reset directive.static @Unmodifiable List<CharacterAndFormat> defaults()Gets an unmodifiable list of character and format instances containing all default vanilla formats.@Nullable TextFormatformat()Gets the format, ornullif this format holds a reset directive.
-
Field Details
-
BLACK
Character and format pair representingNamedTextColor.BLACK.- Since:
- 4.14.0
-
DARK_BLUE
Character and format pair representingNamedTextColor.DARK_BLUE.- Since:
- 4.14.0
-
DARK_GREEN
Character and format pair representingNamedTextColor.DARK_GREEN.- Since:
- 4.14.0
-
DARK_AQUA
Character and format pair representingNamedTextColor.DARK_AQUA.- Since:
- 4.14.0
-
DARK_RED
Character and format pair representingNamedTextColor.DARK_RED.- Since:
- 4.14.0
-
DARK_PURPLE
Character and format pair representingNamedTextColor.DARK_PURPLE.- Since:
- 4.14.0
-
GOLD
Character and format pair representingNamedTextColor.GOLD.- Since:
- 4.14.0
-
GRAY
Character and format pair representingNamedTextColor.GRAY.- Since:
- 4.14.0
-
DARK_GRAY
Character and format pair representingNamedTextColor.DARK_GRAY.- Since:
- 4.14.0
-
BLUE
Character and format pair representingNamedTextColor.BLUE.- Since:
- 4.14.0
-
GREEN
Character and format pair representingNamedTextColor.GREEN.- Since:
- 4.14.0
-
AQUA
Character and format pair representingNamedTextColor.AQUA.- Since:
- 4.14.0
-
RED
Character and format pair representingNamedTextColor.RED.- Since:
- 4.14.0
-
LIGHT_PURPLE
Character and format pair representingNamedTextColor.LIGHT_PURPLE.- Since:
- 4.14.0
-
YELLOW
Character and format pair representingNamedTextColor.YELLOW.- Since:
- 4.14.0
-
WHITE
Character and format pair representingNamedTextColor.WHITE.- Since:
- 4.14.0
-
OBFUSCATED
Character and format pair representingTextDecoration.OBFUSCATED.- Since:
- 4.14.0
-
BOLD
Character and format pair representingTextDecoration.BOLD.- Since:
- 4.14.0
-
STRIKETHROUGH
Character and format pair representingTextDecoration.STRIKETHROUGH.- Since:
- 4.14.0
-
UNDERLINED
Character and format pair representingTextDecoration.UNDERLINED.- Since:
- 4.14.0
-
ITALIC
Character and format pair representingTextDecoration.ITALIC.- Since:
- 4.14.0
-
RESET
Character and format pair representingReset.INSTANCE.- Since:
- 4.14.0
-
-
Method Details
-
characterAndReset
Creates a new combination of a case-sensitivecharacterand the reset directive.- Parameters:
character- the character- Returns:
- a new character and format instance.
- Since:
- 5.0.0
-
characterAndReset
Creates a new combination of a case-sensitivecharacterand the reset directive.- Parameters:
character- the charactercaseInsensitive- if the character is case-insensitive- Returns:
- a new character and format instance.
- Since:
- 5.0.0
-
characterAndFormat
Creates a new combination of a case-sensitivecharacterand aTextFormat.- Parameters:
character- the characterformat- the format- Returns:
- a new character and format instance.
- Since:
- 4.14.0
-
characterAndFormat
static CharacterAndFormat characterAndFormat(char character, TextFormat format, boolean caseInsensitive) Creates a new combination of acharacterand aTextFormat.- Parameters:
character- the characterformat- the formatcaseInsensitive- if the character is case-insensitive- Returns:
- a new character and format instance.
- Since:
- 4.17.0
-
defaults
Gets an unmodifiable list of character and format instances containing all default vanilla formats.- Returns:
- an unmodifiable list of character and format instances containing all default vanilla formats
- Since:
- 4.14.0
-
character
char character()Gets the character.- Returns:
- the character
- Since:
- 4.14.0
-
format
@Nullable TextFormat format()Gets the format, ornullif this format holds a reset directive.- Returns:
- the format
- Since:
- 4.14.0
-
caseInsensitive
boolean caseInsensitive()If thecharacter()is case-insensitive.- Returns:
- if the character is case-insensitive
- Since:
- 4.17.0
-