public boolean isAsync() { return CommandManager.getCurrentCommandOperationContext().isAsync(); } }
@Override public void accept(CommandResult commandResult) { SpongeCommandOperationContext context = (SpongeCommandOperationContext) CommandManager.getCurrentCommandOperationContext(); context.setResult(commandResult); } }
/** @deprecated Unstable API */ @Deprecated @UnstableAPI public CommandHelp generateCommandHelp(@NotNull String command) { verifyUnstableAPI("help"); CommandOperationContext context = getCurrentCommandOperationContext(); if (context == null) { throw new IllegalStateException("This method can only be called as part of a command execution."); } return generateCommandHelp(context.getCommandIssuer(), command); }
/** @deprecated Unstable API */ @Deprecated @UnstableAPI public CommandHelp generateCommandHelp() { verifyUnstableAPI("help"); CommandOperationContext context = getCurrentCommandOperationContext(); if (context == null) { throw new IllegalStateException("This method can only be called as part of a command execution."); } String commandLabel = context.getCommandLabel(); return generateCommandHelp(context.getCommandIssuer(), this.obtainRootCommand(commandLabel)); }
Map<String, Object> passedArgs = new LinkedHashMap<>(); int remainingRequired = requiredResolvers; CommandOperationContext opContext = CommandManager.getCurrentCommandOperationContext(); for (int i = 0; i < parameters.length && i < argLimit; i++) { boolean isLast = i == parameters.length - 1;