Package net.md_5.bungee.api.chat
Class SelectorComponent
java.lang.Object
net.md_5.bungee.api.chat.BaseComponent
net.md_5.bungee.api.chat.SelectorComponent
This component processes a target selector into a pre-formatted set of
discovered names.
Multiple targets may be obtained, and with commas separating each one and a final "and" for the last target. The resulting format cannot be overwritten. This includes all styling from team prefixes, insertions, click events, and hover events.
These values are filled in by the server-side implementation.
As of 1.12.2, a bug ( MC-56373 ) prevents full usage within hover events.
Multiple targets may be obtained, and with commas separating each one and a final "and" for the last target. The resulting format cannot be overwritten. This includes all styling from team prefixes, insertions, click events, and hover events.
These values are filled in by the server-side implementation.
As of 1.12.2, a bug ( MC-56373 ) prevents full usage within hover events.
-
Constructor Summary
ConstructorDescriptionSelectorComponent
(String selector) Creates a selector component from the selectorSelectorComponent
(SelectorComponent original) Creates a selector component from the original to clone it. -
Method Summary
Modifier and TypeMethodDescriptionClones the BaseComponent and returns the clone.protected void
toLegacyText
(StringBuilder builder) protected void
toPlainText
(StringBuilder builder) Methods inherited from class net.md_5.bungee.api.chat.BaseComponent
addExtra, addExtra, applyStyle, copyFormatting, copyFormatting, copyFormatting, duplicateWithoutFormatting, getColor, getColorRaw, getFont, getFontRaw, hasFormatting, hasStyle, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, retain, setBold, setColor, setExtra, setFont, setItalic, setObfuscated, setStrikethrough, setStyle, setUnderlined, toLegacyText, toLegacyText, toPlainText, toPlainText
-
Constructor Details
-
SelectorComponent
Creates a selector component from the original to clone it.- Parameters:
original
- the original for the new selector component
-
SelectorComponent
Creates a selector component from the selector- Parameters:
selector
- the selector as a String
-
-
Method Details
-
duplicate
Description copied from class:BaseComponent
Clones the BaseComponent and returns the clone.- Specified by:
duplicate
in classBaseComponent
- Returns:
- The duplicate of this BaseComponent
-
toPlainText
-
toLegacyText
-