Custom events

This page is about custom events provided by the library.

Introduction

With StaffModLib, you can use custom events to add behaviors to your staff mods or items. In this page, you we'll learn their usefulness and what they consist of.

Staff mod events

In this section, we'll present all the events related with a staff mod in general. You can see them in the following array:

Event

Description

StaffModEnableEvent

Called when enabling a staff mod.

StaffModDisableEvent

Called when disabling a staff mod.

Staff mod item events

In this section, we'll present all the events related with staff mod items. When using other events like PlayerInteractEvent, you are not sure that the interaction concerns a staff mod item specifically. By using the events below, you can be sure of that and it make your code easier because you don't have a lot of checks to do.

Event

Description

ItemUseEvent

Called when a player use an item which is not interacting with anything.

ItemUseOnBlockEvent

Called when a player use an item on a block.

ItemUseOnEntityEvent

Called when a player use an item on an entity.

Last updated