swiftlys2/docs/api/releases/features/ai/
API Reference › Menus

MenuOptionValidatingEventArgs

Class
Namespace: SwiftlyS2.Shared.Menus · Assembly: SwiftlyS2.CS2.dll
[Obsolete("The classic menu system is deprecated and will be removed in future versions. Use Core.Menu (IMenuService) instead.")]
public sealed class MenuOptionValidatingEventArgs : EventArgs
Inherits object, EventArgs

Provides event data for menu option validation events.

View source

Properties

Cancel

Gets or sets a value indicating whether the interaction should be canceled.

public bool Cancel { get; set; }
Property Value

CancelReason

Gets or sets the reason why the interaction was canceled.

public string? CancelReason { get; set; }
Property Value

Option

The menu option being validated.

public required IMenuOption Option { get; init; }
Property Value

Player

The player attempting to interact with the option.

public required IPlayer Player { get; init; }
Property Value