Class ScriptManager
java.lang.Object
com.realtime.crossfire.jxclient.scripts.ScriptManager
Maintains currently running script processes.
-
Constructor Summary
ConstructorsConstructorDescriptionScriptManager
(@NotNull CommandQueue commandQueue, @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull Stats stats, @NotNull FloorView floorView, @NotNull ItemSet itemSet, @NotNull SpellsManager spellsManager, @NotNull MapUpdaterState mapUpdaterState, @NotNull SkillSet skillSet) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription@NotNull Set<ScriptProcess>
getScripts
(@NotNull String partialScriptName) Returns all running scripts matching a given (partial) name or a script ID.boolean
Returns whether at least one script is running.void
Creates a new script instance.
-
Constructor Details
-
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 SpellsManager 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 Details
-
newScript
Creates a new script instance.- Parameters:
command
- the script command including arguments
-
getScripts
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
-