Clean up output for command

This commit is contained in:
BillyGalbreath
2022-01-23 00:38:04 -06:00
parent c876ba19a5
commit f134a20b29
4 changed files with 134 additions and 73 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] ChatColor conveniences
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
index 4594701d77c5d0f744bece871b98d9f6f73eb5a7..0aa79a9fbd5861d217a877a36e985e18fba6256f 100644
index 4594701d77c5d0f744bece871b98d9f6f73eb5a7..a991bfe33f695a6166be6937039098ddea892f7b 100644
--- a/src/main/java/org/bukkit/ChatColor.java
+++ b/src/main/java/org/bukkit/ChatColor.java
@@ -2,6 +2,7 @@ package org.bukkit;
@@ -16,7 +16,7 @@ index 4594701d77c5d0f744bece871b98d9f6f73eb5a7..0aa79a9fbd5861d217a877a36e985e18
import java.util.regex.Pattern;
import org.apache.commons.lang.Validate;
import org.jetbrains.annotations.Contract;
@@ -413,4 +414,72 @@ public enum ChatColor {
@@ -413,4 +414,77 @@ public enum ChatColor {
BY_CHAR.put(color.code, color);
}
}
@@ -60,6 +60,11 @@ index 4594701d77c5d0f744bece871b98d9f6f73eb5a7..0aa79a9fbd5861d217a877a36e985e18
+ .replace("&r", "<r>");
+ }
+
+ @NotNull
+ public static net.kyori.adventure.text.Component parseMM(@NotNull String string, @Nullable Object... args) {
+ return net.kyori.adventure.text.minimessage.MiniMessage.get().parse(String.format(string, args));
+ }
+
+ @Deprecated
+ public static final Pattern HEX_PATTERN = Pattern.compile("(#[A-Fa-f0-9]{6})");
+