类 AdvntrMessageBuilder
java.lang.Object
cn.afternode.commons.advntr.AdvntrMessageBuilder
Adventure-API implementation of MessageBuilder
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明append(net.kyori.adventure.text.ComponentLike componentLike) Append adventure componentaudience(net.kyori.adventure.audience.Audience audience) Set audience for this buildernet.kyori.adventure.text.TextComponentbuild()Convert this builder to an Adventure componentclick(net.kyori.adventure.text.event.ClickEvent event) Append click eventAppend empty linenet.kyori.adventure.audience.AudienceGet Adventure audience passed to this buildernet.kyori.adventure.text.ComponentLikeGet line prefix passed to this builderUNSAFE
Append gradient text, this method uses MiniMessage, may cause injection, NEVER insert player messages with this
MiniMessage docsUNSAFE
Append gradient text, this method uses MiniMessage, may cause injection, NEVER insert player messages with this
MiniMessage docshover(net.kyori.adventure.text.event.HoverEventSource<?> source) Append HoverEventline()Append new line with prefixlinePrefix(net.kyori.adventure.text.ComponentLike prefix) Set line prefixAppend MiniMessage (overwrites style)
MiniMessage docsvoidsend()Convert this builder to Adventure component and send it to sender of this builder
A sender must be passed to this buildervoidsend(net.kyori.adventure.audience.Audience audience) Convert this builder to Adventure component and send it to senderAppend raw textAppend colored raw text
-
构造器详细资料
-
AdvntrMessageBuilder
public AdvntrMessageBuilder()
-
-
方法详细资料
-
text
Append raw text- 参数:
text- Raw text- 返回:
- This builder
-
text
Append colored raw text- 参数:
text- Raw textcolor- AWT color- 返回:
- This builder
- 另请参阅:
-
mini
Append MiniMessage (overwrites style)
MiniMessage docs- 参数:
mini- MiniMessage string- 返回:
- This builder
-
hover
Append HoverEvent- 参数:
source- Event source- 返回:
- This builder
- 另请参阅:
-
click
Append click event- 参数:
event- Event- 返回:
- This builder
- 另请参阅:
-
append
Append adventure component- 参数:
componentLike- Component- 返回:
- This builder
- 另请参阅:
-
line
Append new line with prefix- 返回:
- This builder
- 另请参阅:
-
emptyLine
Append empty line- 返回:
- This builder
-
gradient
UNSAFE
Append gradient text, this method uses MiniMessage, may cause injection, NEVER insert player messages with this
MiniMessage docs- 参数:
text- Textcolors- Colors- 返回:
- This builder
-
gradient
UNSAFE
Append gradient text, this method uses MiniMessage, may cause injection, NEVER insert player messages with this
MiniMessage docs- 参数:
text- Textcolors- Colors- 返回:
- This builder
-
build
public net.kyori.adventure.text.TextComponent build()Convert this builder to an Adventure component- 返回:
- Adventure component
-
send
public void send()Convert this builder to Adventure component and send it to sender of this builder
A sender must be passed to this builder- 另请参阅:
-
send
public void send(net.kyori.adventure.audience.Audience audience) Convert this builder to Adventure component and send it to sender- 参数:
audience- Adventure audience- 另请参阅:
-
getLinePrefix
public net.kyori.adventure.text.ComponentLike getLinePrefix()Get line prefix passed to this builder- 返回:
- Line prefix
-
linePrefix
Set line prefix- 参数:
prefix- Adventure component- 返回:
- This builder
-
getAudience
public net.kyori.adventure.audience.Audience getAudience()Get Adventure audience passed to this builder- 返回:
- Adventure audience
-
audience
Set audience for this builder- 参数:
audience- Adventure audience- 返回:
- This builder
-