mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-19 06:32:03 +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
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Style parse(@NotNull String input) throws ArgumentSyntaxException {
|
public Style parse(@NotNull String input) throws ArgumentSyntaxException {
|
||||||
String uppercaseInput = input.toUpperCase();
|
|
||||||
|
|
||||||
// check for colour
|
// check for colour
|
||||||
NamedTextColor color = NamedTextColor.NAMES.value(uppercaseInput);
|
NamedTextColor color = NamedTextColor.NAMES.value(input);
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
return Style.style(color);
|
return Style.style(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for reset
|
// check for reset
|
||||||
if (uppercaseInput.equals("RESET")) {
|
if (input.equals("reset")) {
|
||||||
return Style.empty();
|
return Style.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user