Skip to content

MenuCloseEvent

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

public ref struct MenuCloseEvent : IEvent

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

public Player Player { get; }

The player.

public MenuCloseReason Reason { get; }

Why it closed.

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 · Menu · MenuCloseReason · Player