public enum ChatColor extends Enum<ChatColor>
列挙型定数と説明 |
---|
AQUA
Represents aqua
|
BLACK
Represents black
|
BLUE
Represents blue
|
BOLD
Makes the text bold.
|
DARK_AQUA
Represents dark blue (aqua)
|
DARK_BLUE
Represents dark blue
|
DARK_GRAY
Represents dark gray
|
DARK_GREEN
Represents dark green
|
DARK_PURPLE
Represents dark purple
|
DARK_RED
Represents dark red
|
GOLD
Represents gold
|
GRAY
Represents gray
|
GREEN
Represents green
|
ITALIC
Makes the text italic.
|
LIGHT_PURPLE
Represents light purple
|
MAGIC
Represents magical characters that change around randomly
|
RED
Represents red
|
RESET
Resets all previous chat colors or formats.
|
STRIKETHROUGH
Makes a line appear through the text.
|
UNDERLINE
Makes the text appear underlined.
|
WHITE
Represents white
|
YELLOW
Represents yellow
|
修飾子とタイプ | フィールドと説明 |
---|---|
static char |
COLOR_CHAR
The special character which prefixes all chat colour codes.
|
修飾子とタイプ | メソッドと説明 |
---|---|
net.md_5.bungee.api.ChatColor |
asBungee() |
static ChatColor |
getByChar(char code)
Gets the color represented by the specified color code
|
static ChatColor |
getByChar(String code)
Gets the color represented by the specified color code
|
char |
getChar()
Gets the char value associated with this color
|
static String |
getLastColors(String input)
Gets the ChatColors used at the end of the given input string.
|
boolean |
isColor()
Checks if this code is a color code as opposed to a format code.
|
boolean |
isFormat()
Checks if this code is a format code as opposed to a color code.
|
static String |
stripColor(String input)
Strips the given message of all color codes
|
String |
toString() |
static String |
translateAlternateColorCodes(char altColorChar,
String textToTranslate)
Translates a string using an alternate color code character into a
string that uses the internal ChatColor.COLOR_CODE color code
character.
|
static ChatColor |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static ChatColor[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final ChatColor BLACK
public static final ChatColor DARK_BLUE
public static final ChatColor DARK_GREEN
public static final ChatColor DARK_AQUA
public static final ChatColor DARK_RED
public static final ChatColor DARK_PURPLE
public static final ChatColor GOLD
public static final ChatColor GRAY
public static final ChatColor DARK_GRAY
public static final ChatColor BLUE
public static final ChatColor GREEN
public static final ChatColor AQUA
public static final ChatColor RED
public static final ChatColor LIGHT_PURPLE
public static final ChatColor YELLOW
public static final ChatColor WHITE
public static final ChatColor MAGIC
public static final ChatColor BOLD
public static final ChatColor STRIKETHROUGH
public static final ChatColor UNDERLINE
public static final ChatColor ITALIC
public static final ChatColor RESET
public static final char COLOR_CHAR
public static ChatColor[] values()
for(ChatColor c: ChatColor.values()) System.out.println(c);
public static ChatColor valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合NullPointerException
- 引数がnullの場合public net.md_5.bungee.api.ChatColor asBungee()
public char getChar()
public boolean isFormat()
public boolean isColor()
public static ChatColor getByChar(char code)
code
- Code to checkChatColor
with the given code,
or null if it doesn't existpublic static ChatColor getByChar(String code)
code
- Code to checkChatColor
with the given code,
or null if it doesn't existpublic static String stripColor(String input)
input
- String to strip of colorpublic static String translateAlternateColorCodes(char altColorChar, String textToTranslate)
altColorChar
- The alternate color code character to replace. Ex: &textToTranslate
- Text containing the alternate color code character.Copyright © 2016. All rights reserved.