public class BungeeMessageBuilder extends MessageConfigBuilder<net.md_5.bungee.api.CommandSender,TextConfig>
receiverClazz, textClazz
构造器和说明 |
---|
BungeeMessageBuilder() |
限定符和类型 | 方法和说明 |
---|---|
<M> @NotNull BungeeMessageListBuilder<M> |
asList(@NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,M> parser)
以多行消息为目标,构建一个消息配置。
|
@NotNull BungeeMessageListBuilder<java.lang.String> |
asStringList() |
@NotNull BungeeMessageValueBuilder<java.lang.String> |
asStringValue() |
<M> @NotNull BungeeMessageValueBuilder<M> |
asValue(@NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,M> parser)
以单条消息为目标,构建一个消息配置。
|
protected static @NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,java.lang.String> |
defaultParser() |
@NotNull public <M> @NotNull BungeeMessageValueBuilder<M> asValue(@NotNull @NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,M> parser)
MessageConfigBuilder
asValue
在类中 MessageConfigBuilder<net.md_5.bungee.api.CommandSender,TextConfig>
M
- 消息类型parser
- 消息解析器,负责将String转换为目标消息类型。@NotNull public <M> @NotNull BungeeMessageListBuilder<M> asList(@NotNull @NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,M> parser)
MessageConfigBuilder
asList
在类中 MessageConfigBuilder<net.md_5.bungee.api.CommandSender,TextConfig>
M
- 消息类型parser
- 消息解析器@NotNull public @NotNull BungeeMessageValueBuilder<java.lang.String> asStringValue()
@NotNull public @NotNull BungeeMessageListBuilder<java.lang.String> asStringList()
@NotNull protected static @NotNull java.util.function.BiFunction<net.md_5.bungee.api.CommandSender,java.lang.String,java.lang.String> defaultParser()
Copyright © 2024. All rights reserved.