Class endstone::InventoryOpenEvent¶
ClassList > endstone > InventoryOpenEvent
Called when a player opens an inventory. More...
#include <endstone/event/inventory/inventory_open_event.h>
Inherits the following classes: endstone::Cancellable
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (InventoryOpenEvent) |
|
| InventoryOpenEvent (Inventory & inventory, const NotNull< Player > & player) |
|
| const NotNull< Player > & | getPlayer () const Returns the player involved in this event. |
Public Functions inherited from endstone::Cancellable¶
| Type | Name |
|---|---|
| virtual void | cancel () Cancel this event. |
| virtual bool | isCancelled () override const Gets the cancellation state of this event. |
| virtual void | setCancelled (bool cancel) override Sets the cancellation state of this event. |
Public Functions inherited from endstone::ICancellable¶
| Type | Name |
|---|---|
| virtual void | cancel () = 0 Cancels this event. |
| virtual bool | isCancelled () const = 0 Gets the cancellation state of this event. |
| virtual void | setCancelled (bool cancel) = 0 Sets the cancellation state of this event. |
| virtual | ~ICancellable () = default |
Detailed Description¶
If this event is cancelled, the inventory will not be opened and the player will not see the container screen.
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function InventoryOpenEvent¶
inline endstone::InventoryOpenEvent::InventoryOpenEvent (
Inventory & inventory,
const NotNull < Player > & player
)
function getPlayer¶
Returns the player involved in this event.
Returns:
Player who is opening the inventory
The documentation for this class was generated from the following file include/endstone/event/inventory/inventory_open_event.h