File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/me/rayzr522/jsonmessage Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,9 @@ public void actionbar(Player... players) {
211211 public JSONMessage color (ChatColor color ) {
212212 if (!color .isColor ())
213213 throw new IllegalArgumentException (color .name () + " is not a color." );
214- return color (color .name ().toLowerCase (), ChatColor .WHITE );
214+
215+ last ().setColor (color );
216+ return this ;
215217 }
216218
217219 /**
@@ -1014,6 +1016,15 @@ public ChatColor getColor() {
10141016 @ Deprecated
10151017 public void setColor (ChatColor color ) {
10161018 setColor (color == null ? null : color .name ().toLowerCase ());
1019+ setLegacyColor (color );
1020+ }
1021+
1022+ /**
1023+ * @param color The legacy ChatColor to set
1024+ * @deprecated Use {@link #setColor(String)} instead
1025+ */
1026+ @ Deprecated
1027+ public void setLegacyColor (ChatColor color ) {
10171028 legacyColor = color ;
10181029 }
10191030
You can’t perform that action at this time.
0 commit comments