Skip to content

Commit

Permalink
Add the permission check to the registration
Browse files Browse the repository at this point in the history
  • Loading branch information
dualspiral committed Apr 3, 2020
1 parent bd74486 commit 0553016
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.api.command.manager;

import org.spongepowered.api.command.Command;
import org.spongepowered.api.command.CommandCause;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.exception.CommandException;
import org.spongepowered.api.command.registrar.CommandRegistrar;
Expand All @@ -37,6 +38,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;

/**
* Registers and dispatches commands
Expand Down Expand Up @@ -137,6 +139,8 @@ public interface CommandManager {
* @param container The {@link PluginContainer} to register the command for
* @param commandTree The {@link CommandTreeBuilder} that represents this command
* structure
* @param requirement What a {@link CommandCause} needs to fulfil in order for this
* command to be executed.
* @param primaryAlias The first command alias to register
* @param secondaryAliases Secondary aliases to register, if any
* @return The {@link CommandMapping} containing the command mapping
Expand All @@ -147,6 +151,7 @@ public interface CommandManager {
CommandMapping registerAlias(CommandRegistrar registrar,
PluginContainer container,
CommandTreeBuilder.Basic commandTree,
Predicate<CommandCause> requirement,
String primaryAlias,
String... secondaryAliases)
throws CommandFailedRegistrationException;
Expand Down

0 comments on commit 0553016

Please sign in to comment.