MenuCloseEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct MenuCloseEvent : IEventA plugin menu was closed for a player (for any reason). The player’s cursor stack has already been given back.
| Id | 271 |
| Key | mc:menu_close |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
Player |
player |
no (readonly) | The player. |
Menu |
int |
no (readonly) | The native id of the menu. |
Reason |
enum:MenuCloseReason |
no (readonly) | Why it closed. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
MenuCloseEvent(Player player, int menu, MenuCloseReason reason) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public MenuCloseEvent(Player player, int menu, MenuCloseReason reason)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 |
|
menu |
int |
|
reason |
MenuCloseReason |
Properties
Section titled “Properties”| Member | Description |
|---|---|
int Menu { get; } |
The native id of the menu. |
Player Player { get; } |
The player. |
MenuCloseReason Reason { get; } |
Why it closed. |
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 int Menu { get; }The native id of the menu.
Player
Section titled “Player”public Player Player { get; }The player.
Reason
Section titled “Reason”public MenuCloseReason Reason { get; }Why it closed.
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.
See also
Section titled “See also”IEvent · Menu · MenuCloseReason · Player