mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-31 21:48:08 +01:00
Fix color argument
This commit is contained in:
parent
a671de1e01
commit
7d1dfabc51
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user