 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.commands;
28 import java.util.Collection;
29 import org.jetbrains.annotations.NotNull;
60 public void execute(@NotNull
final String args) {
66 final String[] tmp = args.split(
" +", 2);
68 if (scriptProcesses.isEmpty()) {
78 final String cmd =
"scripttell "+tmp[1];
80 scriptProcess.commandSent(cmd);
88 final StringBuilder sb =
new StringBuilder();
89 sb.append(
"Communicates with a running client-sided script\n");
91 sb.append(
"Usage: scripttell <script> <text>\n");
93 sb.append(
"Sends <text> to the client-sided script <script>. ");
94 sb.append(
"<script> is the ID of a running client-sided script or the partial name of a running client-sided script. ");
95 sb.append(
"<text> is a text to send to the client-sided script.\n");
96 sb.append(
"Note: List running client-sided scripts: scripts\n");
An external command executed as a client-sided script.
ScripttellCommand(@NotNull final ScriptManager scriptManager, @NotNull final CrossfireServerConnection crossfireServerConnection)
Creates a new instance.
Set< ScriptProcess > getScripts(@NotNull final String partialScriptName)
Returns all running scripts matching a given (partial) name or a script ID.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
boolean hasScripts()
Returns whether at least one script is running.
final ScriptManager scriptManager
The ScriptManager to use.
Abstract base class for Command implementations.
String getHelp()
Returns the help text for this command.
void drawInfoError(@NotNull final String message)
Displays an error message.
Maintains currently running script processes.
Implements the "scripttell" command.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
void execute(@NotNull final String args)
Executes the command with the given arguments.