🎨 @Annotation final -> final @Annotation
This commit is contained in:
parent
a6b98ca278
commit
7f013124b2
113 changed files with 844 additions and 842 deletions
|
|
@ -52,8 +52,8 @@ public final class BungeeCommand<C> extends Command implements TabExecutor {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
BungeeCommand(final cloud.commandframework.@NonNull Command<C> cloudCommand,
|
||||
@NonNull final CommandArgument<C, ?> command,
|
||||
@NonNull final BungeeCommandManager<C> manager) {
|
||||
final @NonNull CommandArgument<C, ?> command,
|
||||
final @NonNull BungeeCommandManager<C> manager) {
|
||||
super(command.getName(),
|
||||
cloudCommand.getCommandPermission().toString(),
|
||||
((StaticArgument<C>) command).getAlternativeAliases().toArray(new String[0]));
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
* @param backwardsCommandSenderMapper Function that maps the command sender type to {@link CommandSender}
|
||||
* @throws Exception If the construction of the manager fails
|
||||
*/
|
||||
public BungeeCommandManager(@NonNull final Plugin owningPlugin,
|
||||
@NonNull final Function<@NonNull CommandTree<C>,
|
||||
public BungeeCommandManager(final @NonNull Plugin owningPlugin,
|
||||
final @NonNull Function<@NonNull CommandTree<C>,
|
||||
@NonNull CommandExecutionCoordinator<C>> commandExecutionCoordinator,
|
||||
@NonNull final Function<@NonNull CommandSender, @NonNull C> commandSenderMapper,
|
||||
@NonNull final Function<@NonNull C, @NonNull CommandSender> backwardsCommandSenderMapper)
|
||||
final @NonNull Function<@NonNull CommandSender, @NonNull C> commandSenderMapper,
|
||||
final @NonNull Function<@NonNull C, @NonNull CommandSender> backwardsCommandSenderMapper)
|
||||
throws Exception {
|
||||
super(commandExecutionCoordinator, new BungeePluginRegistrationHandler<>());
|
||||
((BungeePluginRegistrationHandler<C>) this.getCommandRegistrationHandler()).initialize(this);
|
||||
|
|
@ -62,8 +62,8 @@ public class BungeeCommandManager<C> extends CommandManager<C> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public final boolean hasPermission(@NonNull final C sender,
|
||||
@NonNull final String permission) {
|
||||
public final boolean hasPermission(final @NonNull C sender,
|
||||
final @NonNull String permission) {
|
||||
if (permission.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ final class BungeePluginRegistrationHandler<C> implements CommandRegistrationHan
|
|||
BungeePluginRegistrationHandler() {
|
||||
}
|
||||
|
||||
void initialize(@NonNull final BungeeCommandManager<C> bungeeCommandManager) {
|
||||
void initialize(final @NonNull BungeeCommandManager<C> bungeeCommandManager) {
|
||||
this.bungeeCommandManager = bungeeCommandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean registerCommand(@NonNull final Command<?> command) {
|
||||
public boolean registerCommand(final @NonNull Command<?> command) {
|
||||
/* We only care about the root command argument */
|
||||
final CommandArgument<?, ?> commandArgument = command.getArguments().get(0);
|
||||
if (this.registeredCommands.containsKey(commandArgument)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue