Skip to content

Commit

Permalink
Disable MiniMessage Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Oribuin committed Jun 12, 2024
1 parent 6065911 commit d1d540f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/xyz/oribuin/eternaltags/util/TagsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d1d540f

Please # to comment.