#3621: Warn about use of valid chat colors and add test

This commit is contained in:
md_5
2024-03-31 09:51:05 +11:00
parent f224787222
commit 6ab0f5eba7
3 changed files with 17 additions and 0 deletions

View File

@@ -253,6 +253,9 @@ public abstract class BaseComponent
/**
* Set this component's color.
* <p>
* <b>Warning: This should be a color, not formatting code (ie,
* {@link ChatColor#getColor()} should not be null).</b>
*
* @param color the component color, or null to use the default
*/

View File

@@ -18,6 +18,9 @@ public final class ComponentStyle implements Cloneable
/**
* The color of this style.
* <p>
* <b>Warning: This should be a color, not formatting code (ie,
* {@link ChatColor#getColor()} should not be null).</b>
*/
private ChatColor color;
/**