Event
endstone.event
¶
Classes relating to handling triggered code executions.
Classes:
| Name | Description |
|---|---|
ActorDamageEvent |
Called when an |
ActorDeathEvent |
Called when an |
ActorEvent |
Represents an |
ActorExplodeEvent |
Called when an actor explodes. |
ActorKnockbackEvent |
Called when a living entity receives knockback. |
ActorRemoveEvent |
Called when an |
ActorSpawnEvent |
Called when an |
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 |
BlockEvent |
Represents an |
BlockExplodeEvent |
Called when a block explodes (e.g. bed in the Nether, respawn anchor in the Overworld). |
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 |
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 |
Cancellable |
Represents an event that may be cancelled by a plugin or the server. |
ChunkEvent |
Represents a |
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: |
EventResult |
Represents the result a plugin can apply to an event whose default behaviour can be allowed, denied, or left to the server. |
LeavesDecayEvent |
Called when leaves are decaying naturally. |
LevelEvent |
Represents events within a level. |
MapInitializeEvent |
Called when a map is initialized. |
MobEvent |
Represents an |
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 |
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 an emote. |
PlayerEvent |
Represents a player related event. |
PlayerGameModeChangeEvent |
Called when the |
PlayerInteractActorEvent |
Represents an event that is called when a player right-clicks an actor. |
PlayerInteractEvent |
Represents an event that is called when a player right-clicks a block. |
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 the |
ServerCommandEvent |
Called when a command is run by a non-player, early in the command handling 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
¶
ActorDamageEvent(is_async: bool = False)
Bases: MobEvent, Cancellable
Called when an Actor is damaged.
Attributes:
| Name | Type | Description |
|---|---|---|
damage |
float
|
The raw amount of damage caused by the event. |
damage_source |
DamageSource
|
A |
damage_source
property
¶
damage_source: DamageSource
A DamageSource detailing the source of the damage.
ActorDeathEvent
¶
ActorDeathEvent(is_async: bool = False)
Bases: MobEvent
Called when an Actor dies.
Attributes:
| Name | Type | Description |
|---|---|---|
damage_source |
DamageSource
|
A |
damage_source
property
¶
damage_source: DamageSource
A DamageSource detailing the source of the damage for the death.
ActorExplodeEvent
¶
ActorExplodeEvent(is_async: bool = False)
Bases: ActorEvent, Cancellable
Called when an actor explodes.
Attributes:
| Name | Type | Description |
|---|---|---|
block_list |
list[Block]
|
The list of blocks that would have been removed or were removed from the explosion event. |
location |
Location
|
The location where the explosion happened. |
block_list
property
writable
¶
The list of blocks that would have been removed or were removed from the explosion event.
ActorKnockbackEvent
¶
ActorKnockbackEvent(is_async: bool = False)
Bases: MobEvent, Cancellable
Called when a living entity receives knockback.
Attributes:
| Name | Type | Description |
|---|---|---|
knockback |
Vector
|
The knockback that will be applied to the entity. |
source |
Actor
|
The source actor that has caused knockback to the defender, or |
ActorRemoveEvent
¶
ActorRemoveEvent(is_async: bool = False)
Bases: ActorEvent
Called when an Actor is removed.
This event should only be used for monitoring. Modifying the actor during or after this event
leads to undefined behaviours. This event will not be called for Players.
ActorSpawnEvent
¶
ActorSpawnEvent(is_async: bool = False)
Bases: ActorEvent, Cancellable
Called when an Actor is spawned into a world.
If an Actor Spawn event is cancelled, the actor will not spawn.
ActorTeleportEvent
¶
ActorTeleportEvent(is_async: bool = False)
Bases: ActorEvent, Cancellable
Called when a non-player entity is teleported from one location to another.
This may be as a result of natural causes (Enderman, Shulker), pathfinding (Wolf), or commands (/teleport).
Attributes:
| Name | Type | Description |
|---|---|---|
from_location |
Location
|
The location that this actor moved from. |
to_location |
Location
|
The location that this actor moved to. |
BlockBreakEvent
¶
BlockBreakEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when a block is broken by a player.
If a BlockBreakEvent is cancelled, the block will not break and experience will not drop.
Attributes:
| Name | Type | Description |
|---|---|---|
player |
Player
|
The |
BlockCookEvent
¶
BlockCookEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when an ItemStack is successfully cooked in a block.
Attributes:
| Name | Type | Description |
|---|---|---|
result |
ItemStack
|
The resultant |
source |
ItemStack
|
The smelted (source) |
BlockExplodeEvent
¶
BlockExplodeEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when a block explodes (e.g. bed in the Nether, respawn anchor in the Overworld).
If a BlockExplodeEvent is cancelled, the explosion will not occur.
Attributes:
| Name | Type | Description |
|---|---|---|
block_list |
list[Block]
|
The list of blocks that would have been removed or were removed from the explosion event. |
BlockFormEvent
¶
BlockFormEvent(is_async: bool = False)
Bases: BlockGrowEvent
Called when a block is formed or spreads based on world conditions.
Use BlockSpreadEvent to catch blocks that actually spread and don't just "randomly" form.
Examples:
- Snow forming due to a snow storm.
- Ice forming in a snowy Biome like Taiga or Tundra.
- Obsidian / Cobblestone forming due to contact with water.
- Concrete forming due to mixing of concrete powder and water.
If a Block Form event is cancelled, the block will not be formed.
BlockFromToEvent
¶
BlockFromToEvent(is_async: bool = False)
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).
Attributes:
| Name | Type | Description |
|---|---|---|
to_block |
Block
|
The faced |
BlockGrowEvent
¶
BlockGrowEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when a block grows naturally in the world.
If a Block Grow event is cancelled, the block will not grow.
Attributes:
| Name | Type | Description |
|---|---|---|
new_state |
BlockState
|
The new state of the block after it has grown. |
BlockPistonEvent
¶
BlockPistonEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when a piston block is triggered.
Attributes:
| Name | Type | Description |
|---|---|---|
direction |
BlockFace
|
The direction in which the piston will operate. |
BlockPlaceEvent
¶
BlockPlaceEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when a block is placed by a player.
If a BlockPlaceEvent is cancelled, the block will not be placed.
Attributes:
| Name | Type | Description |
|---|---|---|
block_against |
Block
|
The block that the new block was placed against. |
block_placed |
Block
|
The |
block_replaced_state |
BlockState
|
The |
player |
Player
|
The |
block_replaced_state
property
¶
block_replaced_state: BlockState
The BlockState of the block that was replaced.
BroadcastMessageEvent
¶
BroadcastMessageEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Event triggered for server broadcast messages such as from Server.broadcast.
This event should be async if fired from an async thread.
Attributes:
| Name | Type | Description |
|---|---|---|
message |
str | Translatable
|
The message to broadcast. |
recipients |
set[CommandSender]
|
The set of |
recipients
property
¶
recipients: set[CommandSender]
The set of CommandSenders who will see this broadcast message.
Cancellable
¶
Represents an event that may be cancelled by a plugin or the server.
Methods:
| Name | Description |
|---|---|
cancel |
Cancel this event. |
Attributes:
| Name | Type | Description |
|---|---|---|
is_cancelled |
bool
|
Gets or sets the cancellation state of this event. |
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 this event.
A cancelled event will not be executed in the server, but will still pass to other plugins.
ChunkEvent
¶
ChunkEvent(is_async: bool = False)
Bases: DimensionEvent
Represents a Chunk related event.
Attributes:
| Name | Type | Description |
|---|---|---|
chunk |
Chunk
|
The |
DimensionEvent
¶
DimensionEvent(is_async: bool = False)
Bases: LevelEvent
Represents events within a dimension.
Attributes:
| Name | Type | Description |
|---|---|---|
dimension |
Dimension
|
The |
Event
¶
Event(is_async: bool = False)
Represents an event.
Attributes:
| Name | Type | Description |
|---|---|---|
event_name |
str
|
A user-friendly identifier for this event. |
is_asynchronous |
bool
|
|
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 |
HIGHEST
class-attribute
instance-attribute
¶
Event call is critical and must have the final say in what happens to the event
LOWEST
class-attribute
instance-attribute
¶
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
¶
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
¶
Event call is neither important nor unimportant, and may be run normally
EventResult
¶
LeavesDecayEvent
¶
LeavesDecayEvent(is_async: bool = False)
Bases: BlockEvent, Cancellable
Called when leaves are decaying naturally.
If a Leaves Decay event is cancelled, the leaves will not decay.
MapInitializeEvent
¶
MapInitializeEvent(is_async: bool = False)
Bases: ServerEvent
Called when a map is initialized.
Attributes:
| Name | Type | Description |
|---|---|---|
map |
MapView
|
The |
PacketReceiveEvent
¶
PacketReceiveEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Called when the server receives a packet from a connected client.
Attributes:
| Name | Type | Description |
|---|---|---|
address |
SocketAddress
|
The network address of the client that sent this packet. |
packet_id |
int
|
The ID of the packet. |
payload |
bytes
|
The raw packet data, excluding the header. |
player |
Player
|
The |
sub_client_id |
int
|
The SubClient ID. |
PacketSendEvent
¶
PacketSendEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Called when the server sends a packet to a connected client.
Attributes:
| Name | Type | Description |
|---|---|---|
address |
SocketAddress
|
The network address to which this packet is being sent. |
packet_id |
int
|
The ID of the packet. |
payload |
bytes
|
The raw packet data, excluding the header. |
player |
Player
|
The |
sub_client_id |
int
|
The SubClient ID. |
PlayerBedEnterEvent
¶
PlayerBedEnterEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player is almost about to enter the bed.
Attributes:
| Name | Type | Description |
|---|---|---|
bed |
Block
|
The bed block involved in this event. |
PlayerBedLeaveEvent
¶
PlayerBedLeaveEvent(is_async: bool = False)
Bases: PlayerEvent
Called when a player is leaving a bed.
Attributes:
| Name | Type | Description |
|---|---|---|
bed |
Block
|
The bed block involved in this event. |
PlayerChatEvent
¶
PlayerChatEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player sends a chat message.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
str
|
The format to use to display this chat message. |
message |
str
|
The message that the player is attempting to send. |
player |
Player
|
The player that this message will be displayed as being sent by. |
recipients |
list[Player]
|
The set of |
format
property
writable
¶
format: str
The format to use to display this chat message.
See the format string syntax at https://en.cppreference.com/w/cpp/utility/format/spec.html.
PlayerCommandEvent
¶
PlayerCommandEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called whenever a player runs a command.
Attributes:
| Name | Type | Description |
|---|---|---|
command |
str
|
The command that the player is attempting to send. |
PlayerDeathEvent
¶
PlayerDeathEvent(is_async: bool = False)
Bases: ActorDeathEvent
Called when a Player dies.
Attributes:
| Name | Type | Description |
|---|---|---|
death_message |
str | Translatable | None
|
The death message that will appear to everyone on the server. |
player |
Player
|
The |
death_message
property
writable
¶
death_message: str | Translatable | None
The death message that will appear to everyone on the server.
PlayerDimensionChangeEvent
¶
PlayerDimensionChangeEvent(is_async: bool = False)
Bases: PlayerEvent
Called when a player switches to another dimension.
Attributes:
| Name | Type | Description |
|---|---|---|
from_dimension |
Dimension
|
The player's previous dimension. |
to_dimension |
Dimension
|
The player's new dimension. |
PlayerDropItemEvent
¶
PlayerDropItemEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player drops an item from their inventory.
Attributes:
| Name | Type | Description |
|---|---|---|
item |
ItemStack
|
The |
PlayerEmoteEvent
¶
PlayerEmoteEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player uses an emote.
Attributes:
| Name | Type | Description |
|---|---|---|
emote_id |
str
|
The emote piece ID. |
is_muted |
bool
|
The muted state for the emote. |
PlayerGameModeChangeEvent
¶
PlayerGameModeChangeEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when the GameMode of the player is changed.
Attributes:
| Name | Type | Description |
|---|---|---|
new_game_mode |
GameMode
|
The |
PlayerInteractActorEvent
¶
PlayerInteractActorEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Represents an event that is called when a player right-clicks an actor.
Attributes:
| Name | Type | Description |
|---|---|---|
actor |
Actor
|
The actor that was right-clicked by the player. |
PlayerInteractEvent
¶
PlayerInteractEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Represents an event that is called when a player right-clicks a block.
Classes:
| Name | Description |
|---|---|
Action |
Represents the type of interaction that triggered this event. |
Attributes:
| Name | Type | Description |
|---|---|---|
LEFT_CLICK_AIR |
|
|
LEFT_CLICK_BLOCK |
|
|
RIGHT_CLICK_AIR |
|
|
RIGHT_CLICK_BLOCK |
|
|
action |
Action
|
The action type of this interaction. |
block |
Block
|
The block clicked with this item. |
block_face |
BlockFace
|
The face of the block that was clicked. |
clicked_position |
Vector | None
|
The exact position on the block the player interacted with. |
has_block |
bool
|
|
has_item |
bool
|
|
item |
ItemStack | None
|
The item in hand represented by this event, or |
clicked_position
property
¶
clicked_position: Vector | None
The exact position on the block the player interacted with.
This will be None outside of Action.RIGHT_CLICK_BLOCK. All vector components are between 0.0 and
1.0 inclusive.
item
property
¶
item: ItemStack | None
The item in hand represented by this event, or None if no item.
Action
¶
Bases: Enum
Represents the type of interaction that triggered this event.
Attributes:
| Name | Type | Description |
|---|---|---|
LEFT_CLICK_AIR |
|
|
LEFT_CLICK_BLOCK |
|
|
RIGHT_CLICK_AIR |
|
|
RIGHT_CLICK_BLOCK |
|
PlayerItemConsumeEvent
¶
PlayerItemConsumeEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player is finishing consuming an item (food, potion, milk bucket).
If the ItemStack is modified the server will use the effects of the new item and not remove the
original one from the player's inventory.
If the event is cancelled the effect will not be applied and the item will not be removed from the player's inventory.
Attributes:
| Name | Type | Description |
|---|---|---|
hand |
EquipmentSlot
|
The hand used to consume the item. |
item |
ItemStack
|
An |
PlayerItemHeldEvent
¶
PlayerItemHeldEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player changes their currently held item.
Attributes:
| Name | Type | Description |
|---|---|---|
new_slot |
int
|
The new held slot index. |
previous_slot |
int
|
The previous held slot index. |
PlayerJoinEvent
¶
PlayerJoinEvent(is_async: bool = False)
Bases: PlayerEvent
Called when a player joins a server.
Attributes:
| Name | Type | Description |
|---|---|---|
join_message |
str | Translatable | None
|
The join message to send to all online players. |
join_message
property
writable
¶
join_message: str | Translatable | None
The join message to send to all online players.
PlayerKickEvent
¶
PlayerKickEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player gets kicked from the server.
Attributes:
| Name | Type | Description |
|---|---|---|
reason |
str
|
The reason why the player is getting kicked. |
PlayerLoginEvent
¶
PlayerLoginEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player attempts to login in.
Attributes:
| Name | Type | Description |
|---|---|---|
kick_message |
str
|
The kick message to display if the event is cancelled. |
PlayerMoveEvent
¶
PlayerMoveEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player moves.
Attributes:
| Name | Type | Description |
|---|---|---|
from_location |
Location
|
The location that this player moved from. |
to_location |
Location
|
The location that this player moved to. |
PlayerPickupItemEvent
¶
PlayerPickupItemEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player picks an item up from the ground.
Attributes:
| Name | Type | Description |
|---|---|---|
item |
Item
|
The Item picked up by the entity. |
PlayerPortalEvent
¶
PlayerPortalEvent(is_async: bool = False)
Bases: PlayerTeleportEvent
Called when a player is about to teleport because it is in contact with a portal.
PlayerQuitEvent
¶
PlayerQuitEvent(is_async: bool = False)
Bases: PlayerEvent
Called when a player leaves a server.
Attributes:
| Name | Type | Description |
|---|---|---|
quit_message |
str | Translatable | None
|
The quit message to send to all online players. |
quit_message
property
writable
¶
quit_message: str | Translatable | None
The quit message to send to all online players.
PlayerRespawnEvent
¶
PlayerRespawnEvent(is_async: bool = False)
Bases: PlayerEvent
Called when a player respawns.
Classes:
| Name | Description |
|---|---|
RespawnReason |
An enum to specify the reason a respawn occurred. |
Attributes:
| Name | Type | Description |
|---|---|---|
DEATH |
|
|
END_PORTAL |
|
|
respawn_reason |
RespawnReason
|
The reason this respawn occurred. |
PlayerSkinChangeEvent
¶
PlayerSkinChangeEvent(is_async: bool = False)
Bases: PlayerEvent, Cancellable
Called when a player changes their skin.
Attributes:
| Name | Type | Description |
|---|---|---|
new_skin |
Skin
|
The skin that will be applied. |
skin_change_message |
str | Translatable | None
|
The message to send to all online players for this skin change. |
skin_change_message
property
writable
¶
skin_change_message: str | Translatable | None
The message to send to all online players for this skin change.
PluginDisableEvent
¶
PluginDisableEvent(is_async: bool = False)
Bases: ServerEvent
Called when a plugin is disabled.
Attributes:
| Name | Type | Description |
|---|---|---|
plugin |
Plugin
|
The |
PluginEnableEvent
¶
PluginEnableEvent(is_async: bool = False)
Bases: ServerEvent
Called when a plugin is enabled.
Attributes:
| Name | Type | Description |
|---|---|---|
plugin |
Plugin
|
The |
ScriptMessageEvent
¶
ScriptMessageEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Called when a message is sent by the /scriptevent command.
Attributes:
| Name | Type | Description |
|---|---|---|
message |
str
|
The message to send. |
message_id |
str
|
The message id to send. |
sender |
CommandSender
|
The command sender who sent the script message. |
ServerCommandEvent
¶
ServerCommandEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Called when a command is run by a non-player, early in the command handling process.
You should not use this except for a few cases like logging commands, blocking commands on certain places, or applying modifiers.
The command message contains a slash '/' at the start.
Attributes:
| Name | Type | Description |
|---|---|---|
command |
str
|
The command that the server is attempting to execute from the console. |
sender |
CommandSender
|
The command sender. |
ServerListPingEvent
¶
ServerListPingEvent(is_async: bool = False)
Bases: ServerEvent, Cancellable
Called when a server ping is coming in.
Attributes:
| Name | Type | Description |
|---|---|---|
address |
SocketAddress
|
The address the ping is coming from. |
game_mode |
GameMode
|
The current game mode. |
level_name |
str
|
The level name. |
local_port |
int
|
The local port of the server. |
local_port_v6 |
int
|
The local port of the server for IPv6 support. |
max_players |
int
|
The maximum number of players allowed. |
minecraft_version_network |
str
|
The network version of Minecraft that is supported by this server. |
motd |
str
|
The message of the day. |
network_protocol_version |
int
|
The network protocol version of this server. |
num_players |
int
|
The number of players online. |
server_guid |
str
|
The unique identifier of the server. |
ServerLoadEvent
¶
ServerLoadEvent(is_async: bool = False)
ThunderChangeEvent
¶
ThunderChangeEvent(is_async: bool = False)
Bases: WeatherEvent, Cancellable
Called when the thunder state in a world is changing.
Attributes:
| Name | Type | Description |
|---|---|---|
to_thunder_state |
bool
|
|
WeatherChangeEvent
¶
WeatherChangeEvent(is_async: bool = False)
Bases: WeatherEvent, Cancellable
Called when the weather (rain) state in a world is changing.
Attributes:
| Name | Type | Description |
|---|---|---|
to_weather_state |
bool
|
|
event_handler
¶
event_handler(
*,
priority: EventPriority = ...,
ignore_cancelled: bool = ...
) -> Callable[[_F], _F]