InventoryCloseEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct InventoryCloseEvent : IEventA player closed a container.
| Id | 261 |
| Key | mc:inventory_close |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
Player |
player |
no (readonly) | The player. |
Kind |
enum:InventoryKind |
no (readonly) | The container kind. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
InventoryCloseEvent(Player player, InventoryKind kind) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public InventoryCloseEvent(Player player, InventoryKind kind)Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.
Parameters
| Name | Type | Description |
|---|---|---|
player |
Player |
|
kind |
InventoryKind |
Properties
Section titled “Properties”| Member | Description |
|---|---|
InventoryKind Kind { get; } |
The container kind. |
Player Player { get; } |
The player. |
static ushort CatalogueId { get; } |
Catalogue id (stable ABI). |
static bool IsCancellable { get; } |
Whether handlers can cancel the event. |
static string Key { get; } |
Registry key of the event. |
public InventoryKind Kind { get; }The container kind.
Player
Section titled “Player”public Player Player { get; }The player.
CatalogueId
Section titled “CatalogueId”public static ushort CatalogueId { get; }Catalogue id (stable ABI).
IsCancellable
Section titled “IsCancellable”public static bool IsCancellable { get; }Whether handlers can cancel the event.
public static string Key { get; }Registry key of the event.