Make the command constructor public
This commit is contained in:
parent
953f85bf74
commit
b498cec9ad
1 changed files with 4 additions and 4 deletions
|
|
@ -49,10 +49,10 @@ public class Command<C extends CommandSender> {
|
||||||
@Nullable private final Class<? extends C> senderType;
|
@Nullable private final Class<? extends C> senderType;
|
||||||
@Nonnull private final String commandPermission;
|
@Nonnull private final String commandPermission;
|
||||||
|
|
||||||
protected Command(@Nonnull final List<CommandComponent<C, ?>> commandComponents,
|
public Command(@Nonnull final List<CommandComponent<C, ?>> commandComponents,
|
||||||
@Nonnull final CommandExecutionHandler<C> commandExecutionHandler,
|
@Nonnull final CommandExecutionHandler<C> commandExecutionHandler,
|
||||||
@Nullable final Class<? extends C> senderType,
|
@Nullable final Class<? extends C> senderType,
|
||||||
@Nonnull final String commandPermission) {
|
@Nonnull final String commandPermission) {
|
||||||
this.components = Objects.requireNonNull(commandComponents, "Command components may not be null");
|
this.components = Objects.requireNonNull(commandComponents, "Command components may not be null");
|
||||||
if (this.components.size() == 0) {
|
if (this.components.size() == 0) {
|
||||||
throw new IllegalArgumentException("At least one command component is required");
|
throw new IllegalArgumentException("At least one command component is required");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue