/pl improvement
This commit is contained in:
parent
5200840296
commit
ae6f361ac1
1 changed files with 6 additions and 2 deletions
|
|
@ -7,6 +7,8 @@ import net.frankheijden.serverutils.common.config.MessagesResource;
|
||||||
import net.frankheijden.serverutils.common.entities.ServerUtilsAudience;
|
import net.frankheijden.serverutils.common.entities.ServerUtilsAudience;
|
||||||
import net.frankheijden.serverutils.common.entities.ServerUtilsPlugin;
|
import net.frankheijden.serverutils.common.entities.ServerUtilsPlugin;
|
||||||
import net.frankheijden.serverutils.common.utils.ListComponentBuilder;
|
import net.frankheijden.serverutils.common.utils.ListComponentBuilder;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
|
|
||||||
public abstract class CommandPlugins<U extends ServerUtilsPlugin<P, ?, C, ?, ?>, P, C extends ServerUtilsAudience<?>>
|
public abstract class CommandPlugins<U extends ServerUtilsPlugin<P, ?, C, ?, ?>, P, C extends ServerUtilsAudience<?>>
|
||||||
|
|
@ -28,14 +30,16 @@ public abstract class CommandPlugins<U extends ServerUtilsPlugin<P, ?, C, ?, ?>,
|
||||||
MessagesResource messages = plugin.getMessagesResource();
|
MessagesResource messages = plugin.getMessagesResource();
|
||||||
|
|
||||||
sender.sendMessage(messages.get(MessageKey.PLUGINS_HEADER).toComponent());
|
sender.sendMessage(messages.get(MessageKey.PLUGINS_HEADER).toComponent());
|
||||||
sender.sendMessage(messages.get(MessageKey.PLUGINS_PREFIX).toComponent(
|
TextComponent.Builder builder = Component.text();
|
||||||
|
builder.append(messages.get(MessageKey.PLUGINS_PREFIX).toComponent(
|
||||||
Template.of("count", String.valueOf(plugins.size()))
|
Template.of("count", String.valueOf(plugins.size()))
|
||||||
));
|
));
|
||||||
sender.sendMessage(ListComponentBuilder.create(plugins)
|
builder.append(ListComponentBuilder.create(plugins)
|
||||||
.separator(messages.get(MessageKey.PLUGINS_SEPARATOR).toComponent())
|
.separator(messages.get(MessageKey.PLUGINS_SEPARATOR).toComponent())
|
||||||
.lastSeparator(messages.get(MessageKey.PLUGINS_LAST_SEPARATOR).toComponent())
|
.lastSeparator(messages.get(MessageKey.PLUGINS_LAST_SEPARATOR).toComponent())
|
||||||
.format(pluginFormat)
|
.format(pluginFormat)
|
||||||
.build());
|
.build());
|
||||||
|
sender.sendMessage(builder.build());
|
||||||
sender.sendMessage(messages.get(MessageKey.PLUGININFO_FOOTER).toComponent());
|
sender.sendMessage(messages.get(MessageKey.PLUGININFO_FOOTER).toComponent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue