Skip to content

Event

endstone.event

Classes relating to handling triggered code executions.

Classes:

Name Description
ActorDamageEvent

Called when an Actor is damaged.

ActorDeathEvent

Called when an Actor dies.

ActorEvent

Represents an Actor-related event.

ActorExplodeEvent

Called when an Actor explodes.

ActorKnockbackEvent

Called when a living entity receives knockback.

ActorRemoveEvent

Called when an Actor is removed.

ActorSpawnEvent

Called when an Actor is spawned into a world.

ActorTeleportEvent

Called when a non-player entity is teleported from one location to another.

BlockBreakEvent

Called when a block is broken by a player.

BlockCookEvent

Called when an ItemStack is successfully cooked in a block.

BlockEvent

Represents an Block-related event

BlockExplodeEvent

Called when a block explodes.

BlockFormEvent

Called when a block is formed or spreads based on world conditions.

BlockFromToEvent

Represents events with a source block and a destination block, currently only applies to liquid (lava and water) and teleporting dragon eggs.

BlockGrowEvent

Called when a block grows naturally in the world.

BlockPistonEvent

Called when a piston block is triggered

BlockPistonExtendEvent

Called when a piston extends.

BlockPistonRetractEvent

Called when a piston retracts.

BlockPlaceEvent

Called when a block is placed by a player.

BroadcastMessageEvent

Event triggered for server broadcast messages such as from Server.broadcast

Cancellable

Represents an event that may be cancelled by a plugin or the server.

ChunkEvent

Represents a Chunk related event

ChunkLoadEvent

Called when a chunk is loaded

ChunkUnloadEvent

Called when a chunk is unloaded

DimensionEvent

Represents events within a dimension

Event

Represents an event.

EventPriority

Listeners are called in following order: LOWEST -> LOW -> NORMAL -> HIGH -> HIGHEST -> MONITOR

EventResult
LeavesDecayEvent

Called when leaves are decaying naturally.

LevelEvent

Represents events within a level

MapInitializeEvent

Called when a map is initialized.

MobEvent

Represents an Mob-related event.

PacketReceiveEvent

Called when the server receives a packet from a connected client.

PacketSendEvent

Called when the server sends a packet to a connected client.

PlayerBedEnterEvent

Called when a player is almost about to enter the bed.

PlayerBedLeaveEvent

Called when a player is leaving a bed.

PlayerChatEvent

Called when a player sends a chat message.

PlayerCommandEvent

Called whenever a player runs a command.

PlayerDeathEvent

Called when a player dies

PlayerDimensionChangeEvent

Called when a player switches to another dimension.

PlayerDropItemEvent

Called when a player drops an item from their inventory

PlayerEmoteEvent

Called when a player uses and emote

PlayerEvent

Represents a player related event

PlayerGameModeChangeEvent

Called when the GameMode of the player is changed.

PlayerInteractActorEvent

Represents an event that is called when a player right-clicks an actor.

PlayerInteractEvent

Represents an event that is called when a player interacts with an object or air.

PlayerItemConsumeEvent

Called when a player is finishing consuming an item (food, potion, milk bucket).

PlayerItemHeldEvent

Called when a player changes their currently held item.

PlayerJoinEvent

Called when a player joins a server

PlayerJumpEvent

Called when a player jumps.

PlayerKickEvent

Called when a player gets kicked from the server

PlayerLoginEvent

Called when a player attempts to login in.

PlayerMoveEvent

Called when a player moves.

PlayerPickupItemEvent

Called when a player picks an item up from the ground.

PlayerPortalEvent

Called when a player is about to teleport because it is in contact with a portal.

PlayerQuitEvent

Called when a player leaves a server.

PlayerRespawnEvent

Called when a player respawns.

PlayerSkinChangeEvent

Called when a player changes their skin.

PlayerTeleportEvent

Called when a player is teleported from one location to another.

PluginDisableEvent

Called when a plugin is disabled.

PluginEnableEvent

Called when a plugin is enabled.

ScriptMessageEvent

Called when a message is sent by /scriptevent command

ServerCommandEvent

Called when the console runs a command, early in the process.

ServerEvent

Represents a server-related event

ServerListPingEvent

Called when a server ping is coming in.

ServerLoadEvent

Called when either the server startup or reload has completed.

ThunderChangeEvent

Called when the thunder state in a world is changing.

WeatherChangeEvent

Called when the weather (rain) state in a world is changing.

WeatherEvent

Represents a weather-related event

Functions:

Name Description
event_handler

ActorDamageEvent

Bases: MobEvent, Cancellable

Called when an Actor is damaged.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

damage float

Gets or sets the amount of damage caused by the event

damage_source DamageSource

Gets the source of damage.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

damage property writable

damage: float

Gets or sets the amount of damage caused by the event

damage_source property

damage_source: DamageSource

Gets the source of damage.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ActorDeathEvent

Bases: MobEvent

Called when an Actor dies.

Attributes:

Name Type Description
damage_source DamageSource

Gets the source of damage which caused the death.

damage_source property

damage_source: DamageSource

Gets the source of damage which caused the death.

ActorEvent

Bases: Event

Represents an Actor-related event.

Attributes:

Name Type Description
actor Actor

Returns the Actor involved in this event

actor property

actor: Actor

Returns the Actor involved in this event

ActorExplodeEvent

Bases: ActorEvent, Cancellable

Called when an Actor explodes.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
block_list list[Block]

Gets or sets the list of blocks that would have been removed or were removed from the explosion event.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

location Location

Returns the location where the explosion happened.

block_list property writable

block_list: list[Block]

Gets or sets the list of blocks that would have been removed or were removed from the explosion event.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

location property

location: Location

Returns the location where the explosion happened.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ActorKnockbackEvent

Bases: MobEvent, Cancellable

Called when a living entity receives knockback.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

knockback Vector

Gets or sets the knockback that will be applied to the entity.

source Actor

Get the source actor that has caused knockback to the defender, if exists.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

knockback property writable

knockback: Vector

Gets or sets the knockback that will be applied to the entity.

source property

source: Actor

Get the source actor that has caused knockback to the defender, if exists.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ActorRemoveEvent

Bases: ActorEvent

Called when an Actor is removed.

ActorSpawnEvent

Bases: ActorEvent, Cancellable

Called when an Actor is spawned into a world.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ActorTeleportEvent

Bases: ActorEvent, Cancellable

Called when a non-player entity is teleported from one location to another.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

from_location Location

Gets or sets the location that this actor moved from.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_location Location

Gets or sets the location that this actor moved to.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

from_location property writable

from_location: Location

Gets or sets the location that this actor moved from.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_location property writable

to_location: Location

Gets or sets the location that this actor moved to.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockBreakEvent

Bases: BlockEvent, Cancellable

Called when a block is broken by a player.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

player Player

Gets the Player that is breaking the block involved in this event.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

player property

player: Player

Gets the Player that is breaking the block involved in this event.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockCookEvent

Bases: BlockEvent, Cancellable

Called when an ItemStack is successfully cooked in a block.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

result ItemStack

Gets or sets the resultant ItemStack for this event

source ItemStack

Gets the smelted ItemStack for this event

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

result property writable

result: ItemStack

Gets or sets the resultant ItemStack for this event

source property

source: ItemStack

Gets the smelted ItemStack for this event

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockEvent

Bases: Event

Represents an Block-related event

Attributes:

Name Type Description
block Block

Gets the block involved in this event.

block property

block: Block

Gets the block involved in this event.

BlockExplodeEvent

Bases: BlockEvent, Cancellable

Called when a block explodes.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
block_list list[Block]

Gets or sets the list of blocks that would have been removed or were removed from the explosion event.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

block_list property writable

block_list: list[Block]

Gets or sets the list of blocks that would have been removed or were removed from the explosion event.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockFormEvent

Bases: BlockGrowEvent

Called when a block is formed or spreads based on world conditions. If a Block Form event is cancelled, the block will not be formed.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockFromToEvent

Bases: BlockEvent, Cancellable

Represents events with a source block and a destination block, currently only applies to liquid (lava and water) and teleporting dragon eggs. If a Block From To event is cancelled, the block will not move (the liquid will not flow).

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_block Block

Gets the faced Block.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_block property

to_block: Block

Gets the faced Block.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockGrowEvent

Bases: BlockEvent, Cancellable

Called when a block grows naturally in the world. If a Block Grow event is cancelled, the block will not grow.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_state BlockState

Gets the state of the block where it will form or spread to.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_state property

new_state: BlockState

Gets the state of the block where it will form or spread to.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockPistonEvent

Bases: BlockEvent, Cancellable

Called when a piston block is triggered

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

direction BlockFace

Return the direction in which the piston will operate.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

direction property

direction: BlockFace

Return the direction in which the piston will operate.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockPistonExtendEvent

Bases: BlockPistonEvent

Called when a piston extends.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockPistonRetractEvent

Bases: BlockPistonEvent

Called when a piston retracts.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BlockPlaceEvent

Bases: BlockEvent, Cancellable

Called when a block is placed by a player.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
block_against Block

Gets the block that this block was placed against

block_placed_state BlockState

Gets the BlockState for the block which was placed.

block_replaced Block

Gets the block which was replaced.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

player Player

Gets the player who placed the block involved in this event.

block_against property

block_against: Block

Gets the block that this block was placed against

block_placed_state property

block_placed_state: BlockState

Gets the BlockState for the block which was placed.

block_replaced property

block_replaced: Block

Gets the block which was replaced.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

player property

player: Player

Gets the player who placed the block involved in this event.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

BroadcastMessageEvent

Bases: ServerEvent, Cancellable

Event triggered for server broadcast messages such as from Server.broadcast

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message str | Translatable

Gets or sets the message to broadcast.

recipients set[CommandSender]

Gets a set of recipients that this broadcast message will be displayed to.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message property writable

message: str | Translatable

Gets or sets the message to broadcast.

recipients property

recipients: set[CommandSender]

Gets a set of recipients that this broadcast message will be displayed to.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Cancellable

Represents an event that may be cancelled by a plugin or the server.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ChunkEvent

Bases: DimensionEvent

Represents a Chunk related event

Attributes:

Name Type Description
chunk Chunk

Gets the chunk being loaded/unloaded

chunk property

chunk: Chunk

Gets the chunk being loaded/unloaded

ChunkLoadEvent

Bases: ChunkEvent

Called when a chunk is loaded

ChunkUnloadEvent

Bases: ChunkEvent

Called when a chunk is unloaded

DimensionEvent

Bases: LevelEvent

Represents events within a dimension

Attributes:

Name Type Description
dimension Dimension

Gets the dimension primarily involved with this event

dimension property

dimension: Dimension

Gets the dimension primarily involved with this event

Event

Represents an event.

Attributes:

Name Type Description
event_name str

Gets a user-friendly identifier for this event.

is_asynchronous bool

Whether the event fires asynchronously.

event_name property

event_name: str

Gets a user-friendly identifier for this event.

is_asynchronous property

is_asynchronous: bool

Whether the event fires asynchronously.

EventPriority

Bases: IntEnum

Listeners are called in following order: LOWEST -> LOW -> NORMAL -> HIGH -> HIGHEST -> MONITOR

Attributes:

Name Type Description
HIGH

Event call is of high importance

HIGHEST

Event call is critical and must have the final say in what happens to the event

LOW

Event call is of low importance

LOWEST

Event call is of very low importance and should be run first, to allow other plugins to further customise the outcome

MONITOR

Event is listened to purely for monitoring the outcome of an event. No modifications to the event should be made under this priority.

NORMAL

Event call is neither important nor unimportant, and may be run normally

HIGH class-attribute instance-attribute

HIGH = 3

Event call is of high importance

HIGHEST class-attribute instance-attribute

HIGHEST = 4

Event call is critical and must have the final say in what happens to the event

LOW class-attribute instance-attribute

LOW = 1

Event call is of low importance

LOWEST class-attribute instance-attribute

LOWEST = 0

Event call is of very low importance and should be run first, to allow other plugins to further customise the outcome

MONITOR class-attribute instance-attribute

MONITOR = 5

Event is listened to purely for monitoring the outcome of an event. No modifications to the event should be made under this priority.

NORMAL class-attribute instance-attribute

NORMAL = 2

Event call is neither important nor unimportant, and may be run normally

EventResult

Bases: Enum

Attributes:

Name Type Description
ALLOW
DEFAULT
DENY

ALLOW class-attribute instance-attribute

ALLOW = 2

DEFAULT class-attribute instance-attribute

DEFAULT = 1

DENY class-attribute instance-attribute

DENY = 0

LeavesDecayEvent

Bases: BlockEvent, Cancellable

Called when leaves are decaying naturally. If a Leaves Decay event is cancelled, the leaves will not decay.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

LevelEvent

Bases: Event

Represents events within a level

Attributes:

Name Type Description
level Level

Gets the level primarily involved with this event

level property

level: Level

Gets the level primarily involved with this event

MapInitializeEvent

Bases: ServerEvent

Called when a map is initialized.

Attributes:

Name Type Description
map MapView

Gets the map initialized in this event.

map property

map: MapView

Gets the map initialized in this event.

MobEvent

Bases: Event

Represents an Mob-related event.

Attributes:

Name Type Description
actor Mob

Returns the Mob involved in this event

actor property

actor: Mob

Returns the Mob involved in this event

PacketReceiveEvent

Bases: ServerEvent, Cancellable

Called when the server receives a packet from a connected client.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
address SocketAddress

Gets the network address to which this packet is being sent.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

packet_id int

Gets the ID of the packet.

payload bytes

Gets or sets the raw packet data excluding the header.

player Player

Gets the player involved in this event

sub_client_id int

Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients).

address property

address: SocketAddress

Gets the network address to which this packet is being sent.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

packet_id property

packet_id: int

Gets the ID of the packet.

payload property writable

payload: bytes

Gets or sets the raw packet data excluding the header.

player property

player: Player

Gets the player involved in this event NOTE: This may return None if the packet is sent before the player completes the login process.

sub_client_id property

sub_client_id: int

Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients).

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PacketSendEvent

Bases: ServerEvent, Cancellable

Called when the server sends a packet to a connected client.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
address SocketAddress

Gets the network address to which this packet is being sent.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

packet_id int

Gets the ID of the packet.

payload bytes

Gets or sets the raw packet data excluding the header.

player Player

Gets the player involved in this event

sub_client_id int

Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients).

address property

address: SocketAddress

Gets the network address to which this packet is being sent.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

packet_id property

packet_id: int

Gets the ID of the packet.

payload property writable

payload: bytes

Gets or sets the raw packet data excluding the header.

player property

player: Player

Gets the player involved in this event NOTE: This may return None if the packet is sent before the player completes the login process.

sub_client_id property

sub_client_id: int

Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients).

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerBedEnterEvent

Bases: PlayerEvent, Cancellable

Called when a player is almost about to enter the bed.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
bed Block

Returns the bed block involved in this event.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

bed property

bed: Block

Returns the bed block involved in this event.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerBedLeaveEvent

Bases: PlayerEvent

Called when a player is leaving a bed.

Attributes:

Name Type Description
bed Block

Returns the bed block involved in this event.

bed property

bed: Block

Returns the bed block involved in this event.

PlayerChatEvent

Bases: PlayerEvent, Cancellable

Called when a player sends a chat message.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

format str

Sets the format to use to display this chat message

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message str

Gets or sets the message that the player will send.

player Player

Gets or sets the player that this message will display as

recipients list[Player]

Gets a set of recipients that this chat message will be displayed to

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

format property writable

format: str

Sets the format to use to display this chat message

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message property writable

message: str

Gets or sets the message that the player will send.

player property writable

player: Player

Gets or sets the player that this message will display as

recipients property

recipients: list[Player]

Gets a set of recipients that this chat message will be displayed to

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerCommandEvent

Bases: PlayerEvent, Cancellable

Called whenever a player runs a command.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

command str

Gets or sets the command that the player will send.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

command property writable

command: str

Gets or sets the command that the player will send.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerDeathEvent

Bases: ActorDeathEvent

Called when a player dies

Attributes:

Name Type Description
death_message str | Translatable | None

Gets or sets the death message that will appear to everyone on the server.

player Player

Gets the Player that is breaking the block involved in this event.

death_message property writable

death_message: str | Translatable | None

Gets or sets the death message that will appear to everyone on the server.

player property

player: Player

Gets the Player that is breaking the block involved in this event.

PlayerDimensionChangeEvent

Bases: PlayerEvent

Called when a player switches to another dimension.

Attributes:

Name Type Description
from_dimension Dimension

Gets the dimension the player is switching from.

to_dimension Dimension

Gets the dimension the player is switching to.

from_dimension property

from_dimension: Dimension

Gets the dimension the player is switching from.

to_dimension property

to_dimension: Dimension

Gets the dimension the player is switching to.

PlayerDropItemEvent

Bases: PlayerEvent, Cancellable

Called when a player drops an item from their inventory

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item ItemStack

Gets the ItemStack dropped by the player

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item property

item: ItemStack

Gets the ItemStack dropped by the player

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerEmoteEvent

Bases: PlayerEvent, Cancellable

Called when a player uses and emote

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

emote_id str

Gets the emote piece ID

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

is_muted bool

Gets or sets the muted state for the emote.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

emote_id property

emote_id: str

Gets the emote piece ID

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

is_muted property writable

is_muted: bool

Gets or sets the muted state for the emote.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerEvent

Bases: Event

Represents a player related event

Attributes:

Name Type Description
player Player

Returns the player involved in this event.

player property

player: Player

Returns the player involved in this event.

PlayerGameModeChangeEvent

Bases: PlayerEvent, Cancellable

Called when the GameMode of the player is changed.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_game_mode GameMode

Gets the GameMode the player is switched to.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_game_mode property

new_game_mode: GameMode

Gets the GameMode the player is switched to.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerInteractActorEvent

Bases: PlayerEvent, Cancellable

Represents an event that is called when a player right-clicks an actor.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
actor Actor

Gets the actor that was right-clicked by the player.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

actor property

actor: Actor

Gets the actor that was right-clicked by the player.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerInteractEvent

Bases: PlayerEvent, Cancellable

Represents an event that is called when a player interacts with an object or air.

Classes:

Name Description
Action

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
LEFT_CLICK_AIR
LEFT_CLICK_BLOCK
RIGHT_CLICK_AIR
RIGHT_CLICK_BLOCK
action Action

Returns the action type of interaction

block Block

Returns the clicked block

block_face BlockFace

Returns the face of the block that was clicked

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

clicked_position Vector | None

Gets the exact position on the block the player interacted with.

has_block bool

Check if this event involved a block

has_item bool

Check if this event involved an item

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item ItemStack | None

Returns the item in hand represented by this event

LEFT_CLICK_AIR class-attribute instance-attribute

LEFT_CLICK_AIR = Action.LEFT_CLICK_AIR

LEFT_CLICK_BLOCK class-attribute instance-attribute

LEFT_CLICK_BLOCK = Action.LEFT_CLICK_BLOCK

RIGHT_CLICK_AIR class-attribute instance-attribute

RIGHT_CLICK_AIR = Action.RIGHT_CLICK_AIR

RIGHT_CLICK_BLOCK class-attribute instance-attribute

RIGHT_CLICK_BLOCK = Action.RIGHT_CLICK_BLOCK

action property

action: Action

Returns the action type of interaction

block property

block: Block

Returns the clicked block

block_face property

block_face: BlockFace

Returns the face of the block that was clicked

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

clicked_position property

clicked_position: Vector | None

Gets the exact position on the block the player interacted with.

has_block property

has_block: bool

Check if this event involved a block

has_item property

has_item: bool

Check if this event involved an item

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item property

item: ItemStack | None

Returns the item in hand represented by this event

Action

Bases: Enum

Attributes:

Name Type Description
LEFT_CLICK_AIR
LEFT_CLICK_BLOCK
RIGHT_CLICK_AIR
RIGHT_CLICK_BLOCK
LEFT_CLICK_AIR class-attribute instance-attribute
LEFT_CLICK_AIR = 2
LEFT_CLICK_BLOCK class-attribute instance-attribute
LEFT_CLICK_BLOCK = 0
RIGHT_CLICK_AIR class-attribute instance-attribute
RIGHT_CLICK_AIR = 3
RIGHT_CLICK_BLOCK class-attribute instance-attribute
RIGHT_CLICK_BLOCK = 1

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerItemConsumeEvent

Bases: PlayerEvent, Cancellable

Called when a player is finishing consuming an item (food, potion, milk bucket).

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

hand EquipmentSlot

Get the hand used to consume the item.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item ItemStack

Gets the item that is being consumed.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

hand property

Get the hand used to consume the item.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item property

item: ItemStack

Gets the item that is being consumed.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerItemHeldEvent

Bases: PlayerEvent, Cancellable

Called when a player changes their currently held item.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_slot int

Gets the new held slot index

previous_slot int

Gets the previous held slot index.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_slot property

new_slot: int

Gets the new held slot index

previous_slot property

previous_slot: int

Gets the previous held slot index.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerJoinEvent

Bases: PlayerEvent

Called when a player joins a server

Attributes:

Name Type Description
join_message str | Translatable | None

Gets or sets the join message to send to all online players.

join_message property writable

join_message: str | Translatable | None

Gets or sets the join message to send to all online players.

PlayerJumpEvent

Bases: PlayerMoveEvent

Called when a player jumps.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerKickEvent

Bases: PlayerEvent, Cancellable

Called when a player gets kicked from the server

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

reason str

Gets or sets the reason why the player is getting kicked

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

reason property writable

reason: str

Gets or sets the reason why the player is getting kicked

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerLoginEvent

Bases: PlayerEvent, Cancellable

Called when a player attempts to login in.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

kick_message str

Gets or sets kick message to display if event is cancelled

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

kick_message property writable

kick_message: str

Gets or sets kick message to display if event is cancelled

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerMoveEvent

Bases: PlayerEvent, Cancellable

Called when a player moves.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

from_location Location

Gets or sets the location that this player moved from.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_location Location

Gets or sets the location that this player moved to.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

from_location property writable

from_location: Location

Gets or sets the location that this player moved from.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_location property writable

to_location: Location

Gets or sets the location that this player moved to.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerPickupItemEvent

Bases: PlayerEvent, Cancellable

Called when a player picks an item up from the ground.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item Item

Gets the Item picked up by the entity.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

item property

item: Item

Gets the Item picked up by the entity.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerPortalEvent

Bases: PlayerTeleportEvent

Called when a player is about to teleport because it is in contact with a portal.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerQuitEvent

Bases: PlayerEvent

Called when a player leaves a server.

Attributes:

Name Type Description
quit_message str | Translatable | None

Gets or sets the quit message to send to all online players.

quit_message property writable

quit_message: str | Translatable | None

Gets or sets the quit message to send to all online players.

PlayerRespawnEvent

Bases: PlayerEvent

Called when a player respawns.

PlayerSkinChangeEvent

Bases: PlayerEvent, Cancellable

Called when a player changes their skin.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_skin Skin

Gets the player's new skin.

skin_change_message str | Translatable | None

Gets or sets the message to send to all online players for this skin change.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

new_skin property

new_skin: Skin

Gets the player's new skin.

skin_change_message property writable

skin_change_message: str | Translatable | None

Gets or sets the message to send to all online players for this skin change.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PlayerTeleportEvent

Bases: PlayerMoveEvent

Called when a player is teleported from one location to another.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

PluginDisableEvent

Bases: ServerEvent

Called when a plugin is disabled.

Attributes:

Name Type Description
plugin Plugin

plugin property

plugin: Plugin

PluginEnableEvent

Bases: ServerEvent

Called when a plugin is enabled.

Attributes:

Name Type Description
plugin Plugin

plugin property

plugin: Plugin

ScriptMessageEvent

Bases: ServerEvent, Cancellable

Called when a message is sent by /scriptevent command

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message str

Get the message to send.

message_id str

Get the message id to send.

sender CommandSender

Gets the command sender who initiated the command.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

message property

message: str

Get the message to send.

message_id property

message_id: str

Get the message id to send.

sender property

sender: CommandSender

Gets the command sender who initiated the command.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ServerCommandEvent

Bases: ServerEvent, Cancellable

Called when the console runs a command, early in the process.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

command str

Gets or sets the command that the server will execute

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

sender CommandSender

Get the command sender.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

command property writable

command: str

Gets or sets the command that the server will execute

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

sender property

sender: CommandSender

Get the command sender.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ServerEvent

Bases: Event

Represents a server-related event

ServerListPingEvent

Bases: ServerEvent, Cancellable

Called when a server ping is coming in.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
address SocketAddress

Get the address the ping is coming from.

cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

game_mode GameMode

Gets or sets the current game mode.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

level_name str

Gets or sets the level name.

local_port int

Get or set the local port of the server.

local_port_v6 int

Get or set the local port of the server for IPv6 support

max_players int

Gets or sets the maximum number of players allowed.

minecraft_version_network str

Gets or sets the network version of Minecraft that is supported by this server

motd str

Gets or sets the message of the day message.

network_protocol_version int

Get the network protocol version of this server

num_players int

Gets or sets the number of players online.

server_guid str

Get or set the unique identifier of the server.

address property

address: SocketAddress

Get the address the ping is coming from.

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

game_mode property writable

game_mode: GameMode

Gets or sets the current game mode.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

level_name property writable

level_name: str

Gets or sets the level name.

local_port property writable

local_port: int

Get or set the local port of the server.

local_port_v6 property writable

local_port_v6: int

Get or set the local port of the server for IPv6 support

max_players property writable

max_players: int

Gets or sets the maximum number of players allowed.

minecraft_version_network property writable

minecraft_version_network: str

Gets or sets the network version of Minecraft that is supported by this server

motd property writable

motd: str

Gets or sets the message of the day message.

network_protocol_version property

network_protocol_version: int

Get the network protocol version of this server

num_players property writable

num_players: int

Gets or sets the number of players online.

server_guid property writable

server_guid: str

Get or set the unique identifier of the server.

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

ServerLoadEvent

Bases: Event

Called when either the server startup or reload has completed.

Classes:

Name Description
LoadType

Attributes:

Name Type Description
STARTUP
type LoadType

STARTUP class-attribute instance-attribute

STARTUP = LoadType.STARTUP

type property

type: LoadType

LoadType

Bases: Enum

Attributes:

Name Type Description
STARTUP
STARTUP class-attribute instance-attribute
STARTUP = 0

ThunderChangeEvent

Bases: WeatherEvent, Cancellable

Called when the thunder state in a world is changing.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_thunder_state bool

Gets the state of thunder that the world is being set to

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_thunder_state property

to_thunder_state: bool

Gets the state of thunder that the world is being set to

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

WeatherChangeEvent

Bases: WeatherEvent, Cancellable

Called when the weather (rain) state in a world is changing.

Methods:

Name Description
cancel

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Attributes:

Name Type Description
cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_weather_state bool

Gets the state of weather that the world is being set to

cancelled property writable

cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins. [Warning] Deprecated: Use is_cancelled instead.

is_cancelled property writable

is_cancelled: bool

Gets or sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

to_weather_state property

to_weather_state: bool

Gets the state of weather that the world is being set to

cancel

cancel() -> None

Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

WeatherEvent

Bases: Event

Represents a weather-related event

Attributes:

Name Type Description
level Level

Returns the Level where this event is occurring

level property

level: Level

Returns the Level where this event is occurring

event_handler

event_handler(
    func=None,
    *,
    priority: EventPriority = NORMAL,
    ignore_cancelled: bool = False
) -> Any