EventHeader
Namespace Mc.Scripting · Kind struct
public struct EventHeaderFirst field of every event struct (McEventHeader).
Remarks
Section titled “Remarks”The first field of every event struct. Handlers use Cancelled; the other fields are managed by the runtime.
Fields
Section titled “Fields”| Member | Description |
|---|---|
byte Flags |
Flag bits (bit 0 = cancellable). |
ushort Id |
Event type id. |
uint Size |
Size of the full event struct. |
public byte Flags;Flag bits (bit 0 = cancellable).
public ushort Id;Event type id.
public uint Size;Size of the full event struct.
Properties
Section titled “Properties”| Member | Description |
|---|---|
bool Cancelled { get; set; } |
Whether a handler cancelled the event (ignored if not cancellable). |
bool IsCancellable { get; } |
Whether the event type can be cancelled. |
Cancelled
Section titled “Cancelled”public bool Cancelled { get; set; }Whether a handler cancelled the event (ignored if not cancellable).
IsCancellable
Section titled “IsCancellable”public bool IsCancellable { get; }Whether the event type can be cancelled.
Methods
Section titled “Methods”| Member | Description |
|---|---|
static EventHeader For<T>() where T : struct, IEvent |
Creates the header for event type T. |
For<T>
Section titled “For<T>”public static EventHeader For<T>() where T : struct, IEventCreates the header for event type T.
Returns EventHeader