Package ch.njol.skript.lang
Class ReturnableTrigger<T>
java.lang.Object
ch.njol.skript.lang.TriggerItem
ch.njol.skript.lang.TriggerSection
ch.njol.skript.lang.Trigger
ch.njol.skript.lang.ReturnableTrigger<T>
- All Implemented Interfaces:
Debuggable
,ReturnHandler<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.njol.skript.lang.ReturnHandler
ReturnHandler.ReturnHandlerStack
-
Field Summary
Fields inherited from class ch.njol.skript.lang.TriggerSection
first, last
Fields inherited from class ch.njol.skript.lang.TriggerItem
parent
-
Constructor Summary
ConstructorsConstructorDescriptionReturnableTrigger
(ReturnHandler<T> handler, @Nullable Script script, String name, SkriptEvent event, Function<ReturnHandler<T>, List<TriggerItem>> loadItems) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
returnValues
(org.bukkit.event.Event event, Expression<? extends T> value) Called whenEffReturn
is executedThe return type of this return handler, or null if it can't accept return values in this context (e.g.Methods inherited from class ch.njol.skript.lang.Trigger
execute, getDebugLabel, getEvent, getLineNumber, getName, getScript, setDebugLabel, setLineNumber, toString, walk
Methods inherited from class ch.njol.skript.lang.TriggerSection
run, setNext, setParent, setTriggerItems, walk
Methods inherited from class ch.njol.skript.lang.TriggerItem
debug, getIndentation, getNext, getParent, getTrigger, 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.ReturnHandler
loadReturnableSectionCode, loadReturnableSectionCode, loadReturnableTrigger
-
Constructor Details
-
ReturnableTrigger
public ReturnableTrigger(ReturnHandler<T> handler, @Nullable Script script, String name, SkriptEvent event, Function<ReturnHandler<T>, List<TriggerItem>> loadItems)
-
-
Method Details
-
returnValues
Description copied from interface:ReturnHandler
Called whenEffReturn
is executed- Specified by:
returnValues
in interfaceReturnHandler<T>
- Parameters:
event
- the event providing contextvalue
- an expression representing the value(s) to return
-
isSingleReturnValue
public boolean isSingleReturnValue()- Specified by:
isSingleReturnValue
in interfaceReturnHandler<T>
- Returns:
- whether this return handler may accept multiple return values
-
returnValueType
Description copied from interface:ReturnHandler
The return type of this return handler, or null if it can't accept return values in this context (e.g. a function without a return type).- Specified by:
returnValueType
in interfaceReturnHandler<T>
- Returns:
- the return type
-