Skip to content

Development API: Events

Naomi edited this page May 11, 2020 · 2 revisions

All current available events

Explanation of the events stated above

SpellLoadedEvent

This event is called after a spell is loaded. The only variables in this event is spell. This variable returns the spell which has been loaded. You cannot cancel the loading process of this spell in this event. If you want to cancel the loading process, take a look at SpellLoadEvent.

SpellLoadEvent

This event is called before a spell starts its loading process. It has the same variables as SpellLoadedEvent, the only difference being is that you're able to cancel the loading process with this event.

SpellSelectEvent

This event is called before a new spell has been selected by using right click. The variables in this event are: from (the previous spell, may be null if there wasn't a spell selected yet), to (the spell which is going to be selected next, if the event isn't cancelled), wand (the wand being used to select a new spell), player (the player which is trying to select a new spell). You're able to cancel this event to prevent the player from selecting a new spell.

SpellUseEvent

This event is called before a spell has been executed by using left click. The variables in this event are: spell (the spell which is going to be casted/executed), wand (the wand being used to cast/execute the spell), player (the player executing/casting the spell). You're able to cancel this event to prevent the player from executing/casting their selected spell.

WandLoadedEvent

This event is called after a wand is loaded. The only variables in this event is wand. This variable returns the wand which has been loaded. You cannot cancel the loading process of this wand in this event. If you want to cancel the loading process, take a look at WandLoadEvent.

WandLoadEvent

This event is called before a wand starts its loading process. It has the same variables as WandLoadedEvent, the only difference being is that you're able to cancel the loading process with this event.

Clone this wiki locally