From ed1024c9e7041067f27a83c2e2ac071c8a2b480c Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Tue, 20 Dec 2022 19:04:22 +0100 Subject: [PATCH] make minimessage resolve all tags --- CommandWhitelistBukkit/pom.xml | 2 +- CommandWhitelistCommon/pom.xml | 2 +- .../common/commands/CWCommand.java | 17 +---------------- CommandWhitelistVelocity/pom.xml | 2 +- CommandWhitelistWaterfall/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 21 deletions(-) diff --git a/CommandWhitelistBukkit/pom.xml b/CommandWhitelistBukkit/pom.xml index f553060..3b348ab 100644 --- a/CommandWhitelistBukkit/pom.xml +++ b/CommandWhitelistBukkit/pom.xml @@ -6,7 +6,7 @@ eu.endermite.commandwhitelist CommandWhitelist - 2.5.3 + 2.5.4 Bukkit diff --git a/CommandWhitelistCommon/pom.xml b/CommandWhitelistCommon/pom.xml index edf56a7..560c433 100644 --- a/CommandWhitelistCommon/pom.xml +++ b/CommandWhitelistCommon/pom.xml @@ -6,7 +6,7 @@ eu.endermite.commandwhitelist CommandWhitelist - 2.5.3 + 2.5.4 Common diff --git a/CommandWhitelistCommon/src/main/java/eu/endermite/commandwhitelist/common/commands/CWCommand.java b/CommandWhitelistCommon/src/main/java/eu/endermite/commandwhitelist/common/commands/CWCommand.java index eedd54c..02a5ab2 100644 --- a/CommandWhitelistCommon/src/main/java/eu/endermite/commandwhitelist/common/commands/CWCommand.java +++ b/CommandWhitelistCommon/src/main/java/eu/endermite/commandwhitelist/common/commands/CWCommand.java @@ -5,28 +5,13 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.minimessage.MiniMessage; -import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; -import net.kyori.adventure.text.minimessage.tag.standard.StandardTags; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class CWCommand { - public static MiniMessage miniMessage = MiniMessage.builder().tags( - TagResolver.builder() - .resolver(StandardTags.color()) - .resolver(StandardTags.decorations()) - .resolver(StandardTags.gradient()) - .resolver(StandardTags.font()) - .resolver(StandardTags.reset()) - .resolver(StandardTags.rainbow()) - .resolver(StandardTags.translatable()) - .resolver(StandardTags.newline()) - .resolver(StandardTags.clickEvent()) - .resolver(StandardTags.keybind()) - .build() - ).build(); + public static MiniMessage miniMessage = MiniMessage.miniMessage(); public static boolean addToWhitelist(ConfigCache configCache, String command, String group) { CWGroup cwGroup = configCache.getGroupList().get(group); diff --git a/CommandWhitelistVelocity/pom.xml b/CommandWhitelistVelocity/pom.xml index db65f96..60a5fc4 100644 --- a/CommandWhitelistVelocity/pom.xml +++ b/CommandWhitelistVelocity/pom.xml @@ -6,7 +6,7 @@ eu.endermite.commandwhitelist CommandWhitelist - 2.5.3 + 2.5.4 Velocity diff --git a/CommandWhitelistWaterfall/pom.xml b/CommandWhitelistWaterfall/pom.xml index 70c1bb1..9ec78f6 100644 --- a/CommandWhitelistWaterfall/pom.xml +++ b/CommandWhitelistWaterfall/pom.xml @@ -6,7 +6,7 @@ eu.endermite.commandwhitelist CommandWhitelist - 2.5.3 + 2.5.4 Waterfall diff --git a/pom.xml b/pom.xml index 0ff1bd3..8350ba6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ eu.endermite.commandwhitelist CommandWhitelist - 2.5.3 + 2.5.4 CommandWhitelistCommon CommandWhitelistBukkit