cc.carm.lib.mineconfiguration.bungee.builder.message.BungeeMessageValueBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mineconfiguration-bungee Show documentation
Show all versions of mineconfiguration-bungee Show documentation
轻松(做)配置,适用于BungeeCord的版本,可用JSON与YAML格式。
package cc.carm.lib.mineconfiguration.bungee.builder.message;
import cc.carm.lib.mineconfiguration.bungee.data.TextConfig;
import cc.carm.lib.mineconfiguration.bungee.value.ConfiguredMessage;
import cc.carm.lib.mineconfiguration.common.builder.message.MessageValueBuilder;
import cc.carm.lib.mineconfiguration.common.utils.ParamsUtils;
import net.md_5.bungee.api.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.function.BiFunction;
public class BungeeMessageValueBuilder
extends MessageValueBuilder> {
public BungeeMessageValueBuilder(@NotNull BiFunction<@Nullable CommandSender, @NotNull String, @Nullable M> parser) {
super(CommandSender.class, TextConfig::new, parser);
}
@Override
protected @NotNull BungeeMessageValueBuilder getThis() {
return this;
}
@Override
public @NotNull ConfiguredMessage build() {
return new ConfiguredMessage<>(
buildManifest(TextConfig.of("")),
ParamsUtils.formatParams(this.paramFormatter, this.params),
this.messageParser, this.sendHandler
);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy