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 Type
    Method
    Description
    void
    onActivityChange(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 - Whether script became active or inactive within parser.
      other - The Script that was made active or inactive. Whether it was made active or inactive is the negation of the active. That is to say, if script became active, then other became inactive. Null if parser was inactive (meaning no script became inactive) or became inactive (meaning no script became active).