-
-
Notifications
You must be signed in to change notification settings - Fork 3
Callbacks lifecycle
Misat11 edited this page May 11, 2020
·
2 revisions
There are many types of callbacks. Some of them is just for the inventory, some of them can be bound to specific item. Is it running when some events is called or created or when?
Well,
- the plugin create an event, e.g. ShopTransactionEvent
- if this event has specified item, it'll run the callbacks for this item (if there are any)
- then it'll call all inventory-bound callbacks (if there are any)
- the event will be fired to bukkit
Why?
- Most of callbacks are cancellable so you can cancel it for specific item and if there are an isCancelled() checks than you can prevent other plugins handle it
- You can override the settings for item before main callback or plugin listener is called
Can't find what are you looking for on this wiki? Maybe our automatically generated javadoc could help you https://docs.screamingsandals.org/simpleinventories/simpleinventories-core/
- Welcome on this wiki
- Formats:
- Variables:
- Callbacks: (Groovy only)
-
Examples:
- Making shop (Groovy only)
- Making vault shop (Groovy only)