Package ch.njol.skript.lang.parser
Interface ParserInstance.ScriptActivityChangeEvent
- All Superinterfaces:
Event,Script.Event,ScriptLoader.LoaderEvent
- Enclosing class:
ParserInstance
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface ParserInstance.ScriptActivityChangeEvent
extends ScriptLoader.LoaderEvent, Script.Event
Called when a
Script is made active or inactive in a ParserInstance.
This event will trigger after the change in activity has occurred.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonActivityChange(ParserInstance parser, Script script, boolean active, @Nullable Script other) The method that is called when this event triggers.
-
Method Details
-
onActivityChange
void onActivityChange(ParserInstance parser, Script script, boolean active, @Nullable @Nullable Script other) The method that is called when this event triggers.- Parameters:
parser- The ParserInstance where the activity change occurred.script- The Script this event was registered for.active- Whetherscriptbecame active or inactive withinparser.other- The Script that was made active or inactive. Whether it was made active or inactive is the negation of theactive. That is to say, ifscriptbecame active, thenotherbecame inactive. Null ifparserwas inactive (meaning no script became inactive) or became inactive (meaning no script became active).
-