Make the command constructor public

This commit is contained in:
Alexander Söderberg 2020-09-07 22:48:40 +02:00
parent 953f85bf74
commit b498cec9ad
No known key found for this signature in database
GPG key ID: C0207FF7EA146678

View file

@ -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");