Package ch.njol.skript.util
Class AsyncEffect
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.Statement
ch.njol.skript.lang.Effect
ch.njol.skript.util.AsyncEffect
- All Implemented Interfaces:
Debuggable
,SyntaxElement
Effects that extend this class are ran asynchronously. Next trigger item will be ran
in main server thread, as if there had been a delay before.
Majority of Skript and Minecraft APIs are not thread-safe, so be careful.
Make sure to add set
to
invalid reference
ch.njol.skript.ScriptLoader#hasDelayBefore
Kleenean.TRUE
in the init
method.
-
Field Summary
Fields inherited from class ch.njol.skript.lang.TriggerItem
parent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable TriggerItem
walk
(org.bukkit.event.Event e) Executes this item and returns the next item to run.Methods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, setNext, setParent, toString, walk
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.njol.skript.lang.Debuggable
toString
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, init
-
Constructor Details
-
AsyncEffect
public AsyncEffect()
-
-
Method Details
-
walk
Description copied from class:TriggerItem
Executes this item and returns the next item to run.Overriding classes must call
TriggerItem.debug(Event, boolean)
. If this method is overridden,TriggerItem.run(Event)
is not used anymore and can be ignored.- Overrides:
walk
in classTriggerItem
- Parameters:
e
- The event- Returns:
- The next item to run or null to stop execution
-