TimeSkipEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct TimeSkipEvent : IEventThe day time jumped (sleeping through the night, /time set or /time add).
| Id | 300 |
| Key | mc:time_skip |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
World |
world |
no (readonly) | The dimension. |
Reason |
enum:TimeSkipReason |
no (readonly) | Why. |
SkipAmount |
long |
no (readonly) | Ticks the clock advanced. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
TimeSkipEvent(World world, TimeSkipReason reason, long skipAmount) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public TimeSkipEvent(World world, TimeSkipReason reason, long skipAmount)Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.
Parameters
| Name | Type | Description |
|---|---|---|
world |
World |
|
reason |
TimeSkipReason |
|
skipAmount |
long |
Properties
Section titled “Properties”| Member | Description |
|---|---|
TimeSkipReason Reason { get; } |
Why. |
long SkipAmount { get; } |
Ticks the clock advanced. |
World World { get; } |
The dimension. |
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. |
Reason
Section titled “Reason”public TimeSkipReason Reason { get; }Why.
SkipAmount
Section titled “SkipAmount”public long SkipAmount { get; }Ticks the clock advanced.
public World World { get; }The dimension.
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.