PlayerChangedWorldEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct PlayerChangedWorldEvent : IEventA player arrived in another dimension.
| Id | 126 |
| Key | mc:player_changed_world |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
Player |
player |
no (readonly) | The player. |
FromWorld |
world |
no (readonly) | The dimension left. |
ToWorld |
world |
no (readonly) | The dimension entered. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
PlayerChangedWorldEvent(Player player, World fromWorld, World toWorld) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public PlayerChangedWorldEvent(Player player, World fromWorld, World toWorld)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 |
|
fromWorld |
World |
|
toWorld |
World |
Properties
Section titled “Properties”| Member | Description |
|---|---|
World FromWorld { get; } |
The dimension left. |
Player Player { get; } |
The player. |
World ToWorld { get; } |
The dimension entered. |
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. |
FromWorld
Section titled “FromWorld”public World FromWorld { get; }The dimension left.
Player
Section titled “Player”public Player Player { get; }The player.
ToWorld
Section titled “ToWorld”public World ToWorld { get; }The dimension entered.
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.