mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Clean up output for command
This commit is contained in:
@@ -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})");
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user