类 TextComponent
java.lang.Object
net.md_5.bungee.api.chat.BaseComponent
net.md_5.bungee.api.chat.TextComponent
-
构造器概要
构造器说明Creates a TextComponent with blank text.TextComponent
(BaseComponent... extras) Creates a TextComponent with blank text and the extras set to the passed arrayTextComponent
(TextComponent textComponent) Creates a TextComponent with formatting and text from the passed component -
方法概要
修饰符和类型方法说明Creates a duplicate of this TextComponent.static BaseComponent[]
fromLegacyText
(String message) Converts the old formatting system that usedChatColor.COLOR_CHAR
into the new json based system.static BaseComponent[]
fromLegacyText
(String message, ChatColor defaultColor) Converts the old formatting system that usedChatColor.COLOR_CHAR
into the new json based system.protected void
toLegacyText
(StringBuilder builder) protected void
toPlainText
(StringBuilder builder) toString()
从类继承的方法 net.md_5.bungee.api.chat.BaseComponent
addExtra, addExtra, copyFormatting, copyFormatting, copyFormatting, duplicateWithoutFormatting, getColor, getColorRaw, getFont, getFontRaw, hasFormatting, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, retain, setExtra, toLegacyText, toLegacyText, toPlainText, toPlainText
-
构造器详细资料
-
TextComponent
public TextComponent()Creates a TextComponent with blank text. -
TextComponent
Creates a TextComponent with formatting and text from the passed component- 参数:
textComponent
- the component to copy from
-
TextComponent
Creates a TextComponent with blank text and the extras set to the passed array- 参数:
extras
- the extras to set
-
-
方法详细资料
-
fromLegacyText
Converts the old formatting system that usedChatColor.COLOR_CHAR
into the new json based system.- 参数:
message
- the text to convert- 返回:
- the components needed to print the message to the client
-
fromLegacyText
Converts the old formatting system that usedChatColor.COLOR_CHAR
into the new json based system.- 参数:
message
- the text to convertdefaultColor
- color to use when no formatting is to be applied (i.e. after ChatColor.RESET).- 返回:
- the components needed to print the message to the client
-
duplicate
Creates a duplicate of this TextComponent.- 指定者:
duplicate
在类中BaseComponent
- 返回:
- the duplicate of this TextComponent.
-
toPlainText
-
toLegacyText
-
toString
-