public class AreaTrigger extends Trigger
| Modifier and Type | Class and Description |
|---|---|
static class |
AreaTrigger.EnterTrigger |
static class |
AreaTrigger.ExitTrigger |
cooldowns, executorMap, gvarMap, info, observer, placeholderMap, root, script| Constructor and Description |
|---|
AreaTrigger(TriggerInfo info,
Area area,
File folder) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(Object e,
Map<String,Object> scriptVars,
AbstractAreaTriggerManager.EventType type) |
void |
addEntity(IEntity entity) |
Trigger |
clone() |
Area |
getArea() |
AreaTrigger.EnterTrigger |
getEnterTrigger() |
List<IEntity> |
getEntities() |
IEntity |
getEntity(UUID uuid) |
AreaTrigger.ExitTrigger |
getExitTrigger() |
protected String |
getTimingId()
Get unique id to be used as fully qualified name for the Timings System.
|
protected Interpreter |
initInterpreter(Map<String,Object> scriptVars)
Create interpreter with appropriate options and variables.
|
void |
removeEntity(UUID uuid) |
void |
setEnterTrigger(AreaTrigger.EnterTrigger enterTrigger) |
void |
setEnterTrigger(String script) |
void |
setExitTrigger(AreaTrigger.ExitTrigger exitTrigger) |
void |
setExitTrigger(String script) |
protected void |
startInterpretation(Object e,
Map<String,Object> scriptVars,
Interpreter interpreter,
boolean sync)
Start interpreting the code.
|
String |
toString() |
public AreaTrigger(TriggerInfo info, Area area, File folder)
public Area getArea()
protected Interpreter initInterpreter(Map<String,Object> scriptVars)
TriggerinitInterpreter in class Triggerpublic void activate(Object e, Map<String,Object> scriptVars, AbstractAreaTriggerManager.EventType type)
protected void startInterpretation(Object e, Map<String,Object> scriptVars, Interpreter interpreter, boolean sync)
TriggerstartInterpretation in class Triggere - The Event associated with this TriggerscriptVars - temporary variablesinterpreter - The Interpretersync - set it true will make this method run in the thread that
has called this method. This is useful when this trigger has to cancel an Event;
set it to false will let it run in separate thread. This is more efficient if you
only need to read data from Event and never interact with it.protected String getTimingId()
TriggergetTimingId in class Triggerpublic void setEnterTrigger(String script) throws AbstractTriggerManager.TriggerInitFailedException
public void setExitTrigger(String script) throws AbstractTriggerManager.TriggerInitFailedException
public AreaTrigger.EnterTrigger getEnterTrigger()
public void setEnterTrigger(AreaTrigger.EnterTrigger enterTrigger)
public AreaTrigger.ExitTrigger getExitTrigger()
public void setExitTrigger(AreaTrigger.ExitTrigger exitTrigger)
public void addEntity(IEntity entity)
public void removeEntity(UUID uuid)