Class ScriptManager

java.lang.Object
com.realtime.crossfire.jxclient.scripts.ScriptManager

public class ScriptManager extends Object
Maintains currently running script processes.
  • 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 commands
      crossfireServerConnection - the connection instance
      stats - the stats instance to watch
      floorView - the floor view to use
      itemSet - the item set instance to use
      spellsManager - the spells manager instance to use
      mapUpdaterState - the map updater state instance to use
      skillSet - the skill set for looking up skill names
  • Method Details

    • newScript

      public void newScript(@NotNull @NotNull String command)
      Creates a new script instance.
      Parameters:
      command - the script command including arguments
    • getScripts

      @NotNull public @NotNull Set<ScriptProcess> getScripts(@NotNull @NotNull 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