diff --git a/Common/src/main/java/net/frankheijden/serverutils/common/commands/CommandServerUtils.java b/Common/src/main/java/net/frankheijden/serverutils/common/commands/CommandServerUtils.java index 524feb7..72c581b 100644 --- a/Common/src/main/java/net/frankheijden/serverutils/common/commands/CommandServerUtils.java +++ b/Common/src/main/java/net/frankheijden/serverutils/common/commands/CommandServerUtils.java @@ -36,7 +36,8 @@ import net.frankheijden.serverutils.common.utils.ListComponentBuilder; import net.frankheijden.serverutils.common.utils.KeyValueComponentBuilder; 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.tag.Tag; +import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; public abstract class CommandServerUtils, P, C extends ServerUtilsAudience> extends ServerUtilsCommand { @@ -117,8 +118,9 @@ public abstract class CommandServerUtils messages.get(MessageKey.DEPENDING_PLUGINS_FORMAT).toComponent( - Template.of("plugin", pluginManager.getPluginId(p)) + TagResolver.resolver("plugin", + Tag.inserting(Component.text(pluginManager.getPluginId(p)))) )) .separator(messages.get(MessageKey.DEPENDING_PLUGINS_SEPARATOR).toComponent()) .lastSeparator(messages.get(MessageKey.DEPENDING_PLUGINS_LAST_SEPARATOR).toComponent()) @@ -349,10 +359,12 @@ public abstract class CommandServerUtils { ListComponentBuilder listBuilder = ListComponentBuilder.create() - .format(str -> listFormatMessage.toComponent(Template.of("value", str))) + .format(str -> listFormatMessage.toComponent(TagResolver.resolver("value", + Tag.inserting(Component.text(str))))) .separator(separator) .lastSeparator(lastSeparator) .emptyValue(null);