File tree 1 file changed +12
-1
lines changed
src/main/java/me/rayzr522/jsonmessage
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) {
211
211
public JSONMessage color (ChatColor color ) {
212
212
if (!color .isColor ())
213
213
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 ;
215
217
}
216
218
217
219
/**
@@ -1014,6 +1016,15 @@ public ChatColor getColor() {
1014
1016
@ Deprecated
1015
1017
public void setColor (ChatColor color ) {
1016
1018
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 ) {
1017
1028
legacyColor = color ;
1018
1029
}
1019
1030
You can’t perform that action at this time.
0 commit comments