Source:
public CommandMapping registerAlias( @NonNull final CommandRegistrar<?> registrar, @NonNull final PluginContainer container, final CommandTreeBuilder.@NonNull Basic parameterTree, @NonNull final Predicate<CommandCause> requirement, @NonNull final String primaryAlias, @NonNull final String @NonNull ... secondaryAliases) throws CommandFailedRegistrationException { final List<String> aliases = new ArrayList<>(); aliases.add(primaryAlias); aliases.addAll(Arrays.asList(secondaryAliases)); final String namespaced = container.getMetadata().getId() + ":" + primaryAlias.toLowerCase(Locale.ROOT); final CommandMapping mapping = this.registerAliasWithNamespacing(registrar, container, namespaced, aliases); final com.mojang.brigadier.Command<CommandSource> command = context -> { final org.spongepowered.api.command.parameter.CommandContext spongeContext = (org.spongepowered.api.command.parameter.CommandContext) context; final String[] command1 = context.getInput().split(" ", 2); try { return registrar.process(spongeContext, command1[0], command1.length == 2 ? command1[1] : "").getResult(); } catch (final CommandException e) { throw new SimpleCommandExceptionType(SpongeTexts.toComponent(e.getText())).create(); } }; final Collection<CommandNode<CommandSource>> commandSourceRootCommandNode = ((RootCommandTreeBuilder) parameterTree) .createArgumentTree(command); final LiteralArgumentBuilder<CommandSource> node = LiteralArgumentBuilder.literal(mapping.getPrimaryAlias()); node.requires((Predicate<CommandSource>) (Object) requirement).executes(command); for (final CommandNode<CommandSource> commandNode : commandSourceRootCommandNode) { node.then(commandNode); } final LiteralCommandNode<CommandSource> commandToAppend = BrigadierCommandRegistrar.INSTANCE.register(node); for (final String secondaryAlias : mapping.getAllAliases()) { if (!secondaryAlias.equals(mapping.getPrimaryAlias())) { BrigadierCommandRegistrar.INSTANCE.register(LiteralArgumentBuilder.<CommandSource>literal(secondaryAlias).redirect(commandToAppend)); } } return mapping; }

Target:
public CommandMapping registerAlias( @NonNull final CommandRegistrar<?> registrar, @NonNull final PluginContainer container, final CommandTreeBuilder.@NonNull Basic parameterTree, @NonNull final Predicate<CommandCause> requirement, @NonNull final String primaryAlias, @NonNull final String @NonNull ... secondaryAliases) throws CommandFailedRegistrationException { final List<String> aliases = new ArrayList<>(); aliases.add(primaryAlias); Collections.addAll(aliases, secondaryAliases); final String namespaced = container.getMetadata().getId() + ":" + primaryAlias.toLowerCase(Locale.ROOT); final CommandMapping mapping = this.registerAliasWithNamespacing(registrar, container, namespaced, aliases); final com.mojang.brigadier.Command<CommandSource> command = context -> { final org.spongepowered.api.command.parameter.CommandContext spongeContext = (org.spongepowered.api.command.parameter.CommandContext) context; final String[] command1 = context.getInput().split(" ", 2); try { return registrar.process(spongeContext, command1[0], command1.length == 2 ? command1[1] : "").getResult(); } catch (final CommandException e) { throw new SimpleCommandExceptionType(SpongeTexts.toComponent(e.getText())).create(); } }; final Collection<CommandNode<CommandSource>> commandSourceRootCommandNode = ((RootCommandTreeBuilder) parameterTree) .createArgumentTree(command); final LiteralArgumentBuilder<CommandSource> node = LiteralArgumentBuilder.literal(mapping.getPrimaryAlias()); node.requires((Predicate<CommandSource>) (Object) requirement).executes(command); for (final CommandNode<CommandSource> commandNode : commandSourceRootCommandNode) { node.then(commandNode); } final LiteralCommandNode<CommandSource> commandToAppend = BrigadierCommandRegistrar.INSTANCE.register(node); for (final String secondaryAlias : mapping.getAllAliases()) { if (!secondaryAlias.equals(mapping.getPrimaryAlias())) { BrigadierCommandRegistrar.INSTANCE.register(LiteralArgumentBuilder.<CommandSource>literal(secondaryAlias).redirect(commandToAppend)); } } return mapping; }