Restore old UserParser constructor and deprecate it

This commit is contained in:
p5nbTgip0r 2021-01-25 20:01:13 -08:00 committed by Jason
parent c0df263a32
commit f83eb6c4a1

View file

@ -178,6 +178,18 @@ public final class UserArgument<C> extends CommandArgument<C, User> {
private final Set<ParserMode> modes; private final Set<ParserMode> modes;
private final Isolation isolationLevel; private final Isolation isolationLevel;
/**
* Construct a new argument parser for {@link User}
*
* @param modes List of parsing modes to use when parsing
* @throws java.lang.IllegalArgumentException If no parsing modes were provided
* @deprecated Use {@link #UserParser(Set, Isolation)} instead.
*/
@Deprecated
public UserParser(final @NonNull Set<ParserMode> modes) {
this(modes, Isolation.GLOBAL);
}
/** /**
* Construct a new argument parser for {@link User} * Construct a new argument parser for {@link User}
* *