mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 12:37:42 +01:00
Return null, don't throw NullPointerException (#1131)
This commit is contained in:
parent
a4f392d116
commit
a01ff09563
@ -86,10 +86,7 @@ public class CommandContext {
|
||||
}
|
||||
|
||||
public String getRaw(@NotNull String identifier) {
|
||||
return rawArgs.computeIfAbsent(identifier, s -> {
|
||||
throw new NullPointerException(
|
||||
"The argument with the id '" + identifier + "' has no value assigned, be sure to check your arguments id, your syntax, and that you do not change the argument id dynamically.");
|
||||
});
|
||||
return rawArgs.get(identifier);
|
||||
}
|
||||
|
||||
public void setArg(@NotNull String id, Object value, String rawInput) {
|
||||
|
Loading…
Reference in New Issue
Block a user