Events Reference
AstralCore fires the following custom Bukkit events. All events extend org.bukkit.event.Event and are registered on the server's event bus — listen to them with @EventHandler as usual.
Menu Events
MenuOpenEvent
Fired on the main thread just before a menu is opened for a player.
Cancellable: Yes — cancelling prevents the menu from opening.
Method | Return type | Description |
|---|---|---|
|
| The menu instance about to be opened. |
|
| The player the menu is being opened for. |
MenuCloseEvent
Fired on the main thread when a menu is closed.
Cancellable: No.
Method | Return type | Description |
|---|---|---|
|
| The menu instance that was closed. |
|
| The player who closed the menu. |
MenuClickItemEvent
Fired when a player clicks a MenuItem inside a menu. May fire async (from packet listeners) when using packet-level inventory tracking.
Cancellable: Yes — cancelling prevents the item's actions from executing.
Method | Return type | Description |
|---|---|---|
|
| The menu containing the clicked item. |
|
| The player who clicked. |
|
| The raw slot index that was clicked. |
|
| The |
Player Network Events
These events are fired by PlayerService when the plugin detects a player joining or leaving the network (not just this server). Detection is based on Redis cache updates from all connected servers.
PlayerJoinNetworkEvent
Fired when a player connects to any server on the network.
Cancellable: No.
Method | Return type | Description |
|---|---|---|
|
| The joining player's network profile. |
PlayerQuitNetworkEvent
Fired when a player disconnects from all servers on the network.
Cancellable: No.
Method | Return type | Description |
|---|---|---|
|
| The leaving player's network profile. |
Event Summary
Event | Thread | Cancellable | Description |
|---|---|---|---|
| Main | Yes | Menu about to be opened |
| Main | No | Menu was closed |
| Main or async | Yes | Item clicked in a menu |
| Async | No | Player joined the network |
| Async | No | Player left the network |