ScriptAction

public class ScriptAction

Handles the execution of script actions for EliteMobs. This class interprets the script blueprints and executes the corresponding actions.

Constructors

Link copied to clipboard
public void ScriptAction(ScriptActionBlueprint blueprint, Map<String, ScriptExecutable> eliteScriptMap, ScriptRuntimeOwner runtimeOwner)
Constructs a new ScriptAction with the given blueprint, script map, and elite script.

Properties

Link copied to clipboard
Link copied to clipboard
public final Map<String, ScriptExecutable> eliteScriptMap
Link copied to clipboard
public final static Set<UUID> invulnerablePlayers
A thread-safe set of player UUIDs who are currently invulnerable due to scripts.

Functions

Link copied to clipboard
Link copied to clipboard
public Map<String, ScriptExecutable> getEliteScriptMap()
Link copied to clipboard
protected Collection<Location> getFinalLocationTargets(ScriptActionData scriptActionData)
Retrieves and validates the final target locations based on the script conditions.
Link copied to clipboard
public static Set<UUID> getInvulnerablePlayers()
A thread-safe set of player UUIDs who are currently invulnerable due to scripts.
Link copied to clipboard
protected Collection<Location> getLocationTargets(ScriptActionData scriptActionData)
Retrieves and validates the target locations based on the script conditions.
Link copied to clipboard
protected Collection<LivingEntity> getTargets(ScriptActionData scriptActionData)
Retrieves and validates the target living entities based on the script conditions.
Link copied to clipboard
public void runScript(ScriptActionData previousScriptActionData)
Executes the script action using data from a previous script action.
public void runScript(ScriptActionData previousScriptActionData, Location landingLocation)
Executes the script action upon landing, using data from a previous script action.
public void runScript(EliteEntity eliteEntity, LivingEntity directTarget, Event event)
Executes the script action based on the provided EliteEntity, target, and event.
Link copied to clipboard
public static void shutdown()
Resets the state of all invulnerable players by removing their invulnerability.