Skip to content
Permalink
Browse files
Fix color() docs not listing color names
  • Loading branch information
PseudoKnight committed Jun 24, 2020
1 parent 41eb7fb commit 784191d96c79b88014f7b9c9b8ca936476a22386
Showing 1 changed file with 6 additions and 1 deletion.
@@ -427,8 +427,13 @@ public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntime

@Override
public String docs() {
MCChatColor[] values = MCChatColor.values();
String[] colors = new String[values.length];
for(int i = 0; i < colors.length; i++) {
colors[i] = values[i].name();
}
return "string {name} Returns the color modifier given a color name. If the given color name isn't valid,"
+ " white is used instead. The list of valid colors is: " + StringUtils.Join(MCChatColor.values(), ", ", ", or ")
+ " white is used instead. The list of valid colors is: " + StringUtils.Join(colors, ", ", ", or ")
+ ", in addition the integers 0-15 will work, or the hex numbers from 0-F, and k, l, m, n, o, and r,"
+ " which represent styles. Unlike manually putting in the color symbol, using this function will"
+ " return the platform's color code, so if you are wanting to keep your scripts platform independent,"

0 comments on commit 784191d

Please sign in to comment.