/** * Parses the given {@code command} from the console and dispatches it using * a {@link ConsoleCommandSender}. * * <ol> * <li>First all arguments get processed by the {@link CommandArgument} handlers.</li> * <li>Then the {@link Command} is executed with the processed commands</li> * <li>Last all arguments are processed again</li> * </ol> * * @param command the command line to parse and dispatch * @return whether the command executed successfully * @see CommandManager#dispatchCommand(CommandSender, String) */ public boolean dispatchCommand(String command) { return dispatchCommand(consoleSender, command); }
@Override public void handleInput(Document data, PacketSender packetSender) { String commandLine = data.getString("command"); if (commandLine != null) CloudNet.getInstance().getCommandManager().dispatchCommand(commandLine); } }
@Override public void handleInput(Document data, PacketSender packetSender) { String commandLine = data.getString("commandLine"); CloudNetWrapper.getInstance().getCommandManager().dispatchCommand(commandLine); } }
if (!cloudNetWrapper.getCommandManager().dispatchCommand(commandLine)) System.out.println("Command not found. Use the command \"help\" for further information!"); } catch (Exception ex)
if (!cloudNetCore.getCommandManager().dispatchCommand(dispatcher)) if (!cloudNetCore.getCommandManager().dispatchCommand(commandLine))