 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.commands;
28 import java.util.Collection;
29 import java.util.TreeSet;
30 import org.jetbrains.annotations.NotNull;
60 public void execute(@NotNull
final String args) {
62 if (scriptProcesses.isEmpty()) {
68 for (Object scriptProcess : scriptProcesses) {
77 final StringBuilder sb =
new StringBuilder();
78 sb.append(
"Shows running client-sided scripts\n");
80 sb.append(
"Usage: scripts\n");
81 sb.append(
"Usage: scripts <script>\n");
83 sb.append(
"Lists currently running client-sided scripts. ");
84 sb.append(
"If <scripts> is given, only matching client-sided scripts are shown. Otherwise all running client-sided scripts are shown. ");
85 sb.append(
"<script> is the ID of a running client-sided script or the partial name of a running client-sided script.\n");
86 sb.append(
"Note: Start a new client-sided script: script\n");
87 sb.append(
"Note: Stop a client-sided script: scriptkill\n");
An external command executed as a client-sided script.
Set< ScriptProcess > getScripts(@NotNull final String partialScriptName)
Returns all running scripts matching a given (partial) name or a script ID.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
boolean hasScripts()
Returns whether at least one script is running.
Abstract base class for Command implementations.
String getHelp()
Returns the help text for this command.
Maintains currently running script processes.
final ScriptManager scriptManager
The ScriptManager to use.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.
Implements the "scripts" command.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
void execute(@NotNull final String args)
Executes the command with the given arguments.
void drawInfo(@NotNull final String message)
Displays a regular output message.
ScriptsCommand(@NotNull final ScriptManager scriptManager, @NotNull final CrossfireServerConnection crossfireServerConnection)
Creates a new instance.