Package ch.njol.skript.lang
Class SelfRegisteringSkriptEvent
java.lang.Object
org.skriptlang.skript.lang.structure.Structure
ch.njol.skript.lang.SkriptEvent
ch.njol.skript.lang.SelfRegisteringSkriptEvent
- All Implemented Interfaces:
Debuggable,SyntaxElement
@Deprecated(since="2.7.0",
forRemoval=true)
public abstract class SelfRegisteringSkriptEvent
extends SkriptEvent
Deprecated, for removal: This API element is subject to removal in a future version.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.njol.skript.lang.SkriptEvent
SkriptEvent.ListeningBehaviorNested classes/interfaces inherited from class org.skriptlang.skript.lang.structure.Structure
Structure.Priority, Structure.StructureData -
Field Summary
Fields inherited from class ch.njol.skript.lang.SkriptEvent
eventPriority, listeningBehavior, PRIORITY, supportsListeningBehavior, triggerFields inherited from class org.skriptlang.skript.lang.structure.Structure
DEFAULT_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterParse(Config config) Deprecated, for removal: This API element is subject to removal in a future version.UsepostLoad()instead.final booleancheck(org.bukkit.event.Event e) Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the given Event applies, e.g.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanload()Deprecated, for removal: This API element is subject to removal in a future version.This method handles the loading of the Structure's syntax elements.booleanpostLoad()Deprecated, for removal: This API element is subject to removal in a future version.This method handles the registration of this event with Skript and Bukkit.abstract voidDeprecated, for removal: This API element is subject to removal in a future version.This method's functionality can be replaced by overridingpostLoad().voidunload()Deprecated, for removal: This API element is subject to removal in a future version.This method handles the unregistration of this event with Skript and Bukkit.abstract voidDeprecated, for removal: This API element is subject to removal in a future version.This method's functionality can be replaced by overridingunload().abstract voidDeprecated, for removal: This API element is subject to removal in a future version.This method should no longer be used.Methods inherited from class ch.njol.skript.lang.SkriptEvent
canExecuteAsynchronously, fixPattern, getEventClasses, getEventPriority, getListeningBehavior, getPriority, init, init, isListeningBehaviorSupported, parse, postUnload, preLoad, shouldLoadEventMethods inherited from class org.skriptlang.skript.lang.structure.Structure
getEntryContainer, getSyntaxTypeName, init, parse, parse, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.njol.skript.lang.Debuggable
toStringMethods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, preInit
-
Constructor Details
-
SelfRegisteringSkriptEvent
public SelfRegisteringSkriptEvent()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
register
Deprecated, for removal: This API element is subject to removal in a future version.This method's functionality can be replaced by overridingpostLoad(). Normally, that method would register the parsed trigger withSkriptEventHandler. A reference to theTriggeris available throughSkriptEvent.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
Deprecated, for removal: This API element is subject to removal in a future version.This method's functionality can be replaced by overridingunload(). Normally, that method would unregister the parsed trigger withSkriptEventHandler. A reference to theTriggeris available throughSkriptEvent.trigger.This method is called to unregister this event registered throughregister(Trigger).- Parameters:
t- the same trigger which was registered for this event
-
unregisterAll
Deprecated, for removal: This API element is subject to removal in a future version.This method should no longer be used. Each trigger should be unregistered throughunregister(Trigger).This method is called to unregister all events registered throughregister(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, for removal: This API element is subject to removal in a future version.Description copied from class:SkriptEventThis method handles the loading of the Structure's syntax elements. Only override this method if you know what you are doing!- Overrides:
loadin classSkriptEvent- Returns:
- Whether loading was successful. An error should be printed prior to returning false to specify the cause.
-
postLoad
public boolean postLoad()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SkriptEventThis method handles the registration of this event with Skript and Bukkit. Only override this method if you know what you are doing!- Overrides:
postLoadin classSkriptEvent- Returns:
- Whether postLoading was successful. An error should be printed prior to returning false to specify the cause.
-
unload
public void unload()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SkriptEventThis method handles the unregistration of this event with Skript and Bukkit. Only override this method if you know what you are doing!- Overrides:
unloadin classSkriptEvent
-
check
public final boolean check(org.bukkit.event.Event e) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:SkriptEventChecks whether the given Event applies, e.g. the left-click event is only part of the PlayerInteractEvent, and this checks whether the player left-clicked or not. This method will only be called for events this SkriptEvent is registered for.- Specified by:
checkin classSkriptEvent- Returns:
- true if this is SkriptEvent is represented by the Bukkit Event or false if not
-
afterParse
Deprecated, for removal: This API element is subject to removal in a future version.UsepostLoad()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, for removal: This API element is subject to removal in a future version.- Overrides:
isEventPrioritySupportedin classSkriptEvent- Returns:
- whether this SkriptEvent supports event priorities
-
Structuremethods should be used. See individual methods for their equivalents.