public class ScriptManager
extends java.lang.Object
Constructor and Description |
---|
ScriptManager(@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.
|
Modifier and Type | Method and 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.
|
boolean |
hasScripts()
Returns whether at least one script is running.
|
void |
newScript(@NotNull java.lang.String command)
Creates a new script instance.
|
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)
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 namespublic void newScript(@NotNull @NotNull java.lang.String command)
command
- the script command including arguments@NotNull public @NotNull java.util.Set<ScriptProcess> getScripts(@NotNull @NotNull java.lang.String partialScriptName)
partialScriptName
- the partial name or a script ID to match
against; an empty string matches all scriptspublic boolean hasScripts()