PlayerLevelChangeEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct PlayerLevelChangeEvent : IEventA player’s experience level changed.
| Id | 128 |
| Key | mc:player_level_change |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
Player |
player |
no (readonly) | The player. |
OldLevel |
int |
no (readonly) | Level before. |
NewLevel |
int |
no (readonly) | Level after. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
PlayerLevelChangeEvent(Player player, int oldLevel, int newLevel) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public PlayerLevelChangeEvent(Player player, int oldLevel, int newLevel)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 |
|
oldLevel |
int |
|
newLevel |
int |
Properties
Section titled “Properties”| Member | Description |
|---|---|
int NewLevel { get; } |
Level after. |
int OldLevel { get; } |
Level before. |
Player Player { get; } |
The player. |
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. |
NewLevel
Section titled “NewLevel”public int NewLevel { get; }Level after.
OldLevel
Section titled “OldLevel”public int OldLevel { get; }Level before.
Player
Section titled “Player”public Player Player { get; }The player.
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.