Class ScriptManager
- java.lang.Object
-
- com.realtime.crossfire.jxclient.scripts.ScriptManager
-
public class ScriptManager extends java.lang.ObjectMaintains currently running script processes.
-
-
Constructor Summary
Constructors Constructor Description ScriptManager(@NotNull CommandQueue commandQueue, @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull Stats stats, @NotNull FloorView floorView, @NotNull ItemSet itemSet, @NotNull java.lang.Iterable<Spell> spellsManager, @NotNull MapUpdaterState mapUpdaterState, @NotNull SkillSet skillSet)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.util.Set<ScriptProcess>getScripts(@NotNull java.lang.String partialScriptName)Returns all running scripts matching a given (partial) name or a script ID.booleanhasScripts()Returns whether at least one script is running.voidnewScript(@NotNull java.lang.String command)Creates a new script instance.
-
-
-
Constructor Detail
-
ScriptManager
public ScriptManager(@NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull Stats stats, @NotNull @NotNull FloorView floorView, @NotNull @NotNull ItemSet itemSet, @NotNull @NotNull java.lang.Iterable<Spell> spellsManager, @NotNull @NotNull MapUpdaterState mapUpdaterState, @NotNull @NotNull SkillSet skillSet)Creates a new instance.- Parameters:
commandQueue- the command queue for sending commandscrossfireServerConnection- the connection instancestats- the stats instance to watchfloorView- the floor view to useitemSet- the item set instance to usespellsManager- the spells manager instance to usemapUpdaterState- the map updater state instance to useskillSet- the skill set for looking up skill names
-
-
Method Detail
-
newScript
public void newScript(@NotNull @NotNull java.lang.String command)Creates a new script instance.- Parameters:
command- the script command including arguments
-
getScripts
@NotNull public @NotNull java.util.Set<ScriptProcess> getScripts(@NotNull @NotNull java.lang.String partialScriptName)
Returns all running scripts matching a given (partial) name or a script ID.- Parameters:
partialScriptName- the partial name or a script ID to match against; an empty string matches all scripts- Returns:
- the matching scripts, possibly empty
-
hasScripts
public boolean hasScripts()
Returns whether at least one script is running.- Returns:
- whether at least one script is running
-
-