22 package com.realtime.crossfire.jxclient.commands;
27 import java.util.Collection;
28 import org.jetbrains.annotations.NotNull;
48 super(
"scriptkillall", crossfireServerConnection);
64 public void execute(@NotNull
final String args) {
65 final Collection<ScriptProcess> scriptProcesses = scriptManager.
getScripts(args);
66 if (scriptProcesses.isEmpty()) {
Abstract base class for Command implementations.
ScriptkillallCommand(@NotNull final ScriptManager scriptManager, @NotNull final CrossfireServerConnection crossfireServerConnection)
Creates a new instance.
void drawInfoError(@NotNull final String message)
Displays an error message.
final ScriptManager scriptManager
The ScriptManager to use.
final CrossfireServerConnection crossfireServerConnection
The connection instance.
boolean hasScripts()
Returns whether at least one script is running.
Maintains currently running script processes.
Set< ScriptProcess > getScripts(@NotNull final String partialScriptName)
Returns all running scripts matching a given (partial) name or a script ID.
void killScript()
Kills the script process.
An external command executed as a client-sided script.
void execute(@NotNull final String args)
Executes the command with the given arguments.the command arguments
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
boolean allArguments()
Returns whether all remaining commands should be included as arguments.whether all remaining commands...
Implements the "scriptkillall" command.