Use TagResolver instead of Template
This commit is contained in:
parent
217c57d8e6
commit
98fc752bd4
1 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import net.frankheijden.serverutils.common.config.ConfigKey;
|
|||
import net.frankheijden.serverutils.common.config.MessageKey;
|
||||
import net.frankheijden.serverutils.common.entities.ServerUtilsAudience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.Template;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
|
||||
public enum WatchResult implements AbstractResult {
|
||||
START(MessageKey.WATCHPLUGIN_START),
|
||||
|
|
@ -23,7 +23,7 @@ public enum WatchResult implements AbstractResult {
|
|||
this.key = key;
|
||||
}
|
||||
|
||||
public void sendTo(ServerUtilsAudience<?> sender, Template... templates) {
|
||||
public void sendTo(ServerUtilsAudience<?> sender, TagResolver... templates) {
|
||||
Component component = ServerUtilsApp.getPlugin().getMessagesResource().get(key).toComponent(templates);
|
||||
sender.sendMessage(component);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue