Deprecate ChatColor (#9069)

All API that uses it is deprecated
This commit is contained in:
Jake Potrebic
2023-04-02 11:53:29 -07:00
parent 7d091ee970
commit 74b88dc367
7 changed files with 87 additions and 12 deletions

View File

@@ -3261,6 +3261,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ });
+ }
+
+ @SuppressWarnings("deprecation") // valid use to convert legacy string to mini-message in legacy migration
+ private static String miniMessage(final String input) {
+ return MiniMessage.miniMessage().serialize(LegacyComponentSerializer.legacySection().deserialize(ChatColor.translateAlternateColorCodes('&', input)));
+ }