Skip to content

InventoryCloseEvent

Namespace Mc.Scripting.Events · Kind struct (ref)

public ref struct InventoryCloseEvent : IEvent

A 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.
Member Description
InventoryCloseEvent(Player player, InventoryKind kind) Creates the event (for firing it from a plugin; native code builds its own).
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
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.

public Player Player { get; }

The player.

public static ushort CatalogueId { get; }

Catalogue id (stable ABI).

public static bool IsCancellable { get; }

Whether handlers can cancel the event.

public static string Key { get; }

Registry key of the event.

IEvent · InventoryKind · Player