From d1d540f1559d85aafea31d04e4bfd2c35aafc58c Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 12 Jun 2024 18:06:36 +0100 Subject: [PATCH] Disable MiniMessage Formatting --- build.gradle | 2 +- .../eternaltags/manager/ConfigurationManager.java | 2 +- .../java/xyz/oribuin/eternaltags/util/TagsUtils.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 3cc81c8..3409a64 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ dependencies { // Mojang dependencies compileOnly 'com.mojang:authlib:1.5.21' - compileOnly 'net.kyori:adventure-text-minimessage:4.14.0' +// compileOnly 'net.kyori:adventure-text-minimessage:4.14.0' // Frameworks & APIs api('dev.rosewood:rosegarden:1.3.1') diff --git a/src/main/java/xyz/oribuin/eternaltags/manager/ConfigurationManager.java b/src/main/java/xyz/oribuin/eternaltags/manager/ConfigurationManager.java index e6f750e..5eb97ca 100644 --- a/src/main/java/xyz/oribuin/eternaltags/manager/ConfigurationManager.java +++ b/src/main/java/xyz/oribuin/eternaltags/manager/ConfigurationManager.java @@ -37,7 +37,7 @@ public enum Setting implements RoseSetting { TAG_LOCKED_FORMAT("tag-locked-format", "&c&lLocked", "The format that will show when the player has the tag locked."), TAG_PREFIX("tag-prefix", "", "The prefix that will be added in front of the tag in the placeholder"), TAG_SUFFIX("tag-suffix", "", "The suffix that will be added after the tag in the placeholder"), - TAG_FORMATTING("tag-formatting", "LEGACY", "The formatting that will be used when displaying tags by the plugin.", "Available options: LEGACY, MINI_MESSAGE"), +// TAG_FORMATTING("tag-formatting", "LEGACY", "The formatting that will be used when displaying tags by the plugin.", "Available options: LEGACY, MINI_MESSAGE"), DESCRIPTION_DELIMITER("description-delimiter", "\n", "The delimiter that will be used for %eternaltags_tag_description%"), // Other Options diff --git a/src/main/java/xyz/oribuin/eternaltags/util/TagsUtils.java b/src/main/java/xyz/oribuin/eternaltags/util/TagsUtils.java index 819818b..3de731a 100644 --- a/src/main/java/xyz/oribuin/eternaltags/util/TagsUtils.java +++ b/src/main/java/xyz/oribuin/eternaltags/util/TagsUtils.java @@ -60,12 +60,12 @@ private TagsUtils() { public static String colorAsString(String text) { if (text == null) return ""; - if (Setting.TAG_FORMATTING.getString().equalsIgnoreCase("mini_message")) { - if (MINIMESSAGE == null) MINIMESSAGE = MiniMessage.miniMessage(); - if (LEGACY == null) LEGACY = LegacyComponentSerializer.legacySection(); - - return LEGACY.serialize(MINIMESSAGE.deserialize(text)); - } +// if (Setting.TAG_FORMATTING.getString().equalsIgnoreCase("mini_message")) { +// if (MINIMESSAGE == null) MINIMESSAGE = MiniMessage.miniMessage(); +// if (LEGACY == null) LEGACY = LegacyComponentSerializer.legacySection(); +// +// return LEGACY.serialize(MINIMESSAGE.deserialize(text)); +// } return HexUtils.colorify(text); }