Class SelfRegisteringSkriptEvent

All Implemented Interfaces:
Debuggable, SyntaxElement

@Deprecated public abstract class SelfRegisteringSkriptEvent extends SkriptEvent
Deprecated.
Regular Structure methods should be used. See individual methods for their equivalents.
  • Constructor Details

    • SelfRegisteringSkriptEvent

      public SelfRegisteringSkriptEvent()
      Deprecated.
  • Method Details

    • register

      public abstract void register(Trigger t)
      Deprecated.
      This method's functionality can be replaced by overriding postLoad(). Normally, that method would register the parsed trigger with SkriptEventHandler. A reference to the Trigger is available through SkriptEvent.trigger.
      This method is called after the whole trigger is loaded for events that fire themselves.
      Parameters:
      t - the trigger to register to this event
    • unregister

      public abstract void unregister(Trigger t)
      Deprecated.
      This method's functionality can be replaced by overriding unload(). Normally, that method would unregister the parsed trigger with SkriptEventHandler. A reference to the Trigger is available through SkriptEvent.trigger.
      This method is called to unregister this event registered through register(Trigger).
      Parameters:
      t - the same trigger which was registered for this event
    • unregisterAll

      public abstract void unregisterAll()
      Deprecated.
      This method should no longer be used. Each trigger should be unregistered through unregister(Trigger).
      This method is called to unregister all events registered through register(Trigger). This is called on all registered events, thus it can also only unregister the event it is called on.
    • load

      public boolean load()
      Deprecated.
      Description copied from class: SkriptEvent
      This method handles the loading of the Structure's syntax elements. Only override this method if you know what you are doing!
      Overrides:
      load in class SkriptEvent
      Returns:
      Whether loading was successful. An error should be printed prior to returning false to specify the cause.
    • postLoad

      public boolean postLoad()
      Deprecated.
      Description copied from class: SkriptEvent
      This method handles the registration of this event with Skript and Bukkit. Only override this method if you know what you are doing!
      Overrides:
      postLoad in class SkriptEvent
      Returns:
      Whether postLoading was successful. An error should be printed prior to returning false to specify the cause.
    • unload

      public void unload()
      Deprecated.
      Description copied from class: SkriptEvent
      This method handles the unregistration of this event with Skript and Bukkit. Only override this method if you know what you are doing!
      Overrides:
      unload in class SkriptEvent
    • check

      public final boolean check(org.bukkit.event.Event e)
      Deprecated.
      Description copied from class: SkriptEvent
      Checks whether the given Event applies, e.g. the leftclick event is only part of the PlayerInteractEvent, and this checks whether the player leftclicked or not. This method will only be called for events this SkriptEvent is registered for.
      Specified by:
      check in class SkriptEvent
      Returns:
      true if this is SkriptEvent is represented by the Bukkit Event or false if not
    • afterParse

      @Deprecated public void afterParse(Config config)
      Deprecated.
      Use postLoad() instead.
      This method is called when this event is parsed. Overriding this is optional, and usually not needed.
      Parameters:
      config - Script that is being parsed
    • isEventPrioritySupported

      public boolean isEventPrioritySupported()
      Deprecated.
      Overrides:
      isEventPrioritySupported in class SkriptEvent
      Returns:
      whether this SkriptEvent supports event priorities