Fix color argument

This commit is contained in:
TheMode 2021-04-24 10:37:09 +02:00
parent a671de1e01
commit 7d1dfabc51

View File

@ -25,16 +25,15 @@ public class ArgumentColor extends Argument<Style> {
@NotNull
@Override
public Style parse(@NotNull String input) throws ArgumentSyntaxException {
String uppercaseInput = input.toUpperCase();
// check for colour
NamedTextColor color = NamedTextColor.NAMES.value(uppercaseInput);
NamedTextColor color = NamedTextColor.NAMES.value(input);
if (color != null) {
return Style.style(color);
}
// check for reset
if (uppercaseInput.equals("RESET")) {
if (input.equals("reset")) {
return Style.empty();
}