public final class ChatComponentTransformer extends Object
ScoreComponent.getName()
} into the matching entity's name as well as
replacing the ScoreComponent.getValue()
with the matching value in
the Scoreboard
if and only if the
ScoreComponent.getValue()
is not present.Constructor and Description |
---|
ChatComponentTransformer() |
Modifier and Type | Method and Description |
---|---|
static ChatComponentTransformer |
getInstance() |
boolean |
isSelectorPattern(String pattern)
Checks if the given string is an entity selector.
|
net.md_5.bungee.api.chat.BaseComponent[] |
transform(ProxiedPlayer player,
net.md_5.bungee.api.chat.BaseComponent... component)
Transform a set of components, and attempt to transform the transformable
fields.
|
public static ChatComponentTransformer getInstance()
public net.md_5.bungee.api.chat.BaseComponent[] transform(ProxiedPlayer player, net.md_5.bungee.api.chat.BaseComponent... component)
BaseComponent.getExtra()
).player
- playercomponent
- the component to transformIllegalArgumentException
- if an entity selector pattern is presentpublic boolean isSelectorPattern(String pattern)
pattern
- the pattern to checkCopyright © 2012–2020 SpigotMC. All rights reserved.