endstone.event
Classes relating to handling triggered code executions.
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. If a Block Form event is cancelled, the block will not be formed. |
BlockFromToEvent | 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). |
BlockGrowEvent | Called when a block grows naturally in the world. If a Block Grow event is cancelled, the block will not grow. |
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. If a Leaves Decay event is cancelled, the leaves will not decay. |
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 |
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 |
classActorDamageEvent
Bases: MobEvent, Cancellable
ActorDamageEvent()Called when an Actor is damaged.
Attributes
| Name | Type | Description |
|---|---|---|
damage | float | Gets or sets the amount of damage caused by the event |
damage_source | DamageSource | Gets the source of damage. |
attrdamageproperty
damage: floatGets or sets the amount of damage caused by the event
attrdamage_sourceproperty
damage_source: DamageSourceGets the source of damage.
classActorDeathEvent
Bases: MobEvent
ActorDeathEvent()Called when an Actor dies.
Attributes
| Name | Type | Description |
|---|---|---|
damage_source | DamageSource | Gets the source of damage which caused the death. |
attrdamage_sourceproperty
damage_source: DamageSourceGets the source of damage which caused the death.
classActorEvent
Bases: Event
ActorEvent()Represents an Actor-related event.
classActorExplodeEvent
Bases: ActorEvent, Cancellable
ActorExplodeEvent()Called when an Actor explodes.
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. |
location | Location | Returns the location where the explosion happened. |
attrblock_listproperty
Gets or sets the list of blocks that would have been removed or were removed from the explosion event.
attrlocationproperty
location: LocationReturns the location where the explosion happened.
classActorKnockbackEvent
Bases: MobEvent, Cancellable
ActorKnockbackEvent()Called when a living entity receives knockback.
Attributes
classActorRemoveEvent
Bases: ActorEvent
ActorRemoveEvent()Called when an Actor is removed.
classActorSpawnEvent
Bases: ActorEvent, Cancellable
ActorSpawnEvent()Called when an Actor is spawned into a world.
classActorTeleportEvent
Bases: ActorEvent, Cancellable
ActorTeleportEvent()Called when a non-player entity is teleported from one location to another.
Attributes
| Name | Type | Description |
|---|---|---|
from_location | Location | Gets or sets the location that this actor moved from. |
to_location | Location | Gets or sets the location that this actor moved to. |
attrfrom_locationproperty
from_location: LocationGets or sets the location that this actor moved from.
attrto_locationproperty
to_location: LocationGets or sets the location that this actor moved to.
classBlockBreakEvent
Bases: BlockEvent, Cancellable
BlockBreakEvent()Called when a block is broken by a player.
Attributes
classBlockCookEvent
Bases: BlockEvent, Cancellable
BlockCookEvent()Called when an ItemStack is successfully cooked in a block.
Attributes
classBlockEvent
Bases: Event
BlockEvent()Represents an Block-related event
classBlockExplodeEvent
Bases: BlockEvent, Cancellable
BlockExplodeEvent()Called when a block explodes.
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. |
attrblock_listproperty
Gets or sets the list of blocks that would have been removed or were removed from the explosion event.
classBlockFormEvent
Bases: BlockGrowEvent
BlockFormEvent()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.
classBlockFromToEvent
Bases: BlockEvent, Cancellable
BlockFromToEvent()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).
classBlockGrowEvent
Bases: BlockEvent, Cancellable
BlockGrowEvent()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 | Gets the state of the block where it will form or spread to. |
attrnew_stateproperty
new_state: BlockStateGets the state of the block where it will form or spread to.
classBlockPistonEvent
Bases: BlockEvent, Cancellable
BlockPistonEvent()Called when a piston block is triggered
Attributes
classBlockPistonExtendEvent
Bases: BlockPistonEvent
BlockPistonExtendEvent()Called when a piston extends.
classBlockPistonRetractEvent
Bases: BlockPistonEvent
BlockPistonRetractEvent()Called when a piston retracts.
classBlockPlaceEvent
Bases: BlockEvent, Cancellable
BlockPlaceEvent()Called when a block is placed by a player.
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. |
player | Player | Gets the player who placed the block involved in this event. |
attrblock_againstproperty
block_against: BlockGets the block that this block was placed against
attrblock_placed_stateproperty
block_placed_state: BlockStateGets the BlockState for the block which was placed.
attrblock_replacedproperty
block_replaced: BlockGets the block which was replaced.
attrplayerproperty
player: PlayerGets the player who placed the block involved in this event.
classBroadcastMessageEvent
Bases: ServerEvent, Cancellable
BroadcastMessageEvent()Event triggered for server broadcast messages such as from Server.broadcast
Attributes
| Name | Type | Description |
|---|---|---|
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. |
attrmessageproperty
message: str | TranslatableGets or sets the message to broadcast.
attrrecipientsproperty
recipients: set[CommandSender]Gets a set of recipients that this broadcast message will be displayed to.
classCancellable
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. |
attrcancelledproperty
cancelled: boolGets 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.
attris_cancelledproperty
is_cancelled: boolGets 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.
methcancel
cancel() -> NoneCancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
classChunkEvent
Bases: DimensionEvent
ChunkEvent()Represents a Chunk related event
classChunkLoadEvent
Bases: ChunkEvent
ChunkLoadEvent()Called when a chunk is loaded
classChunkUnloadEvent
Bases: ChunkEvent
ChunkUnloadEvent()Called when a chunk is unloaded
classDimensionEvent
Bases: LevelEvent
DimensionEvent()Represents events within a dimension
Attributes
classEvent
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. |
attrevent_nameproperty
event_name: strGets a user-friendly identifier for this event.
attris_asynchronousproperty
is_asynchronous: boolWhether the event fires asynchronously.
classEventPriority
Bases: IntEnum
EventPriority()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 |
attrHIGH
HIGH = 3Event call is of high importance
attrHIGHEST
HIGHEST = 4Event call is critical and must have the final say in what happens to the event
attrLOW
LOW = 1Event call is of low importance
attrLOWEST
LOWEST = 0Event call is of very low importance and should be run first, to allow other plugins to further customise the outcome
attrMONITOR
MONITOR = 5Event is listened to purely for monitoring the outcome of an event. No modifications to the event should be made under this priority.
attrNORMAL
NORMAL = 2Event call is neither important nor unimportant, and may be run normally
classEventResult
Bases: Enum
EventResult()classLeavesDecayEvent
Bases: BlockEvent, Cancellable
LeavesDecayEvent()Called when leaves are decaying naturally. If a Leaves Decay event is cancelled, the leaves will not decay.
classLevelEvent
Bases: Event
LevelEvent()Represents events within a level
classMapInitializeEvent
Bases: ServerEvent
MapInitializeEvent()Called when a map is initialized.
classMobEvent
Bases: Event
MobEvent()Represents an Mob-related event.
classPacketReceiveEvent
Bases: ServerEvent, Cancellable
PacketReceiveEvent()Called when the server receives a packet from a connected client.
Attributes
| Name | Type | Description |
|---|---|---|
address | SocketAddress | Gets the network address to which this packet is being sent. |
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 NOTE: This may return None if the packet is sent before the player completes the login process. |
sub_client_id | int | Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients). |
attraddressproperty
address: SocketAddressGets the network address to which this packet is being sent.
attrpacket_idproperty
packet_id: intGets the ID of the packet.
attrpayloadproperty
payload: bytesGets or sets the raw packet data excluding the header.
attrplayerproperty
player: PlayerGets the player involved in this event NOTE: This may return None if the packet is sent before the player completes the login process.
attrsub_client_idproperty
sub_client_id: intGets the SubClient ID (0 = primary client; 1-3 = split-screen clients).
classPacketSendEvent
Bases: ServerEvent, Cancellable
PacketSendEvent()Called when the server sends a packet to a connected client.
Attributes
| Name | Type | Description |
|---|---|---|
address | SocketAddress | Gets the network address to which this packet is being sent. |
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 NOTE: This may return None if the packet is sent before the player completes the login process. |
sub_client_id | int | Gets the SubClient ID (0 = primary client; 1-3 = split-screen clients). |
attraddressproperty
address: SocketAddressGets the network address to which this packet is being sent.
attrpacket_idproperty
packet_id: intGets the ID of the packet.
attrpayloadproperty
payload: bytesGets or sets the raw packet data excluding the header.
attrplayerproperty
player: PlayerGets the player involved in this event NOTE: This may return None if the packet is sent before the player completes the login process.
attrsub_client_idproperty
sub_client_id: intGets the SubClient ID (0 = primary client; 1-3 = split-screen clients).
classPlayerBedEnterEvent
Bases: PlayerEvent, Cancellable
PlayerBedEnterEvent()Called when a player is almost about to enter the bed.
classPlayerBedLeaveEvent
Bases: PlayerEvent
PlayerBedLeaveEvent()Called when a player is leaving a bed.
classPlayerChatEvent
Bases: PlayerEvent, Cancellable
PlayerChatEvent()Called when a player sends a chat message.
Attributes
attrformatproperty
format: strSets the format to use to display this chat message
attrmessageproperty
message: strGets or sets the message that the player will send.
attrplayerproperty
player: PlayerGets or sets the player that this message will display as
attrrecipientsproperty
Gets a set of recipients that this chat message will be displayed to
classPlayerCommandEvent
Bases: PlayerEvent, Cancellable
PlayerCommandEvent()Called whenever a player runs a command.
classPlayerDeathEvent
Bases: ActorDeathEvent
PlayerDeathEvent()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. |
attrdeath_messageproperty
death_message: str | Translatable | NoneGets or sets the death message that will appear to everyone on the server.
attrplayerproperty
player: PlayerGets the Player that is breaking the block involved in this event.
classPlayerDimensionChangeEvent
Bases: PlayerEvent
PlayerDimensionChangeEvent()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. |
attrfrom_dimensionproperty
from_dimension: DimensionGets the dimension the player is switching from.
attrto_dimensionproperty
to_dimension: DimensionGets the dimension the player is switching to.
classPlayerDropItemEvent
Bases: PlayerEvent, Cancellable
PlayerDropItemEvent()Called when a player drops an item from their inventory
classPlayerEmoteEvent
Bases: PlayerEvent, Cancellable
PlayerEmoteEvent()Called when a player uses and emote
Attributes
classPlayerEvent
Bases: Event
PlayerEvent()Represents a player related event
classPlayerGameModeChangeEvent
Bases: PlayerEvent, Cancellable
PlayerGameModeChangeEvent()Called when the GameMode of the player is changed.
Attributes
| Name | Type | Description |
|---|---|---|
new_game_mode | GameMode | Gets the GameMode the player is switched to. |
attrnew_game_modeproperty
new_game_mode: GameModeGets the GameMode the player is switched to.
classPlayerInteractActorEvent
Bases: PlayerEvent, Cancellable
PlayerInteractActorEvent()Represents an event that is called when a player right-clicks an actor.
classPlayerInteractEvent
Bases: PlayerEvent, Cancellable
PlayerInteractEvent()Represents an event that is called when a player interacts with an object or air.
Classes
| Name | Description |
|---|---|
Action |
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 |
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 |
item | ItemStack | None | Returns the item in hand represented by this event |
attrLEFT_CLICK_AIR
LEFT_CLICK_AIRattrLEFT_CLICK_BLOCK
LEFT_CLICK_BLOCKattrRIGHT_CLICK_AIR
RIGHT_CLICK_AIRattrRIGHT_CLICK_BLOCK
RIGHT_CLICK_BLOCKattractionproperty
action: ActionReturns the action type of interaction
attrblockproperty
block: BlockReturns the clicked block
attrblock_faceproperty
block_face: BlockFaceReturns the face of the block that was clicked
attrclicked_positionproperty
clicked_position: Vector | NoneGets the exact position on the block the player interacted with.
attrhas_blockproperty
has_block: boolCheck if this event involved a block
attrhas_itemproperty
has_item: boolCheck if this event involved an item
attritemproperty
item: ItemStack | NoneReturns the item in hand represented by this event
classAction
Bases: Enum
Action()Attributes
| Name | Type | Description |
|---|---|---|
LEFT_CLICK_AIR | ||
LEFT_CLICK_BLOCK | ||
RIGHT_CLICK_AIR | ||
RIGHT_CLICK_BLOCK |
attrLEFT_CLICK_AIR
LEFT_CLICK_AIR = 2attrLEFT_CLICK_BLOCK
LEFT_CLICK_BLOCK = 0attrRIGHT_CLICK_AIR
RIGHT_CLICK_AIR = 3attrRIGHT_CLICK_BLOCK
RIGHT_CLICK_BLOCK = 1classPlayerItemConsumeEvent
Bases: PlayerEvent, Cancellable
PlayerItemConsumeEvent()Called when a player is finishing consuming an item (food, potion, milk bucket).
Attributes
| Name | Type | Description |
|---|---|---|
hand | EquipmentSlot | Get the hand used to consume the item. |
item | ItemStack | Gets the item that is being consumed. |
attrhandproperty
hand: EquipmentSlotGet the hand used to consume the item.
attritemproperty
item: ItemStackGets the item that is being consumed.
classPlayerItemHeldEvent
Bases: PlayerEvent, Cancellable
PlayerItemHeldEvent()Called when a player changes their currently held item.
Attributes
| Name | Type | Description |
|---|---|---|
new_slot | int | Gets the new held slot index |
previous_slot | int | Gets the previous held slot index. |
attrnew_slotproperty
new_slot: intGets the new held slot index
attrprevious_slotproperty
previous_slot: intGets the previous held slot index.
classPlayerJoinEvent
Bases: PlayerEvent
PlayerJoinEvent()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. |
attrjoin_messageproperty
join_message: str | Translatable | NoneGets or sets the join message to send to all online players.
classPlayerJumpEvent
Bases: PlayerMoveEvent
PlayerJumpEvent()Called when a player jumps.
classPlayerKickEvent
Bases: PlayerEvent, Cancellable
PlayerKickEvent()Called when a player gets kicked from the server
classPlayerLoginEvent
Bases: PlayerEvent, Cancellable
PlayerLoginEvent()Called when a player attempts to login in.
Attributes
| Name | Type | Description |
|---|---|---|
kick_message | str | Gets or sets kick message to display if event is cancelled |
attrkick_messageproperty
kick_message: strGets or sets kick message to display if event is cancelled
classPlayerMoveEvent
Bases: PlayerEvent, Cancellable
PlayerMoveEvent()Called when a player moves.
Attributes
| Name | Type | Description |
|---|---|---|
from_location | Location | Gets or sets the location that this player moved from. |
to_location | Location | Gets or sets the location that this player moved to. |
attrfrom_locationproperty
from_location: LocationGets or sets the location that this player moved from.
attrto_locationproperty
to_location: LocationGets or sets the location that this player moved to.
classPlayerPickupItemEvent
Bases: PlayerEvent, Cancellable
PlayerPickupItemEvent()Called when a player picks an item up from the ground.
classPlayerPortalEvent
Bases: PlayerTeleportEvent
PlayerPortalEvent()Called when a player is about to teleport because it is in contact with a portal.
classPlayerQuitEvent
Bases: PlayerEvent
PlayerQuitEvent()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. |
attrquit_messageproperty
quit_message: str | Translatable | NoneGets or sets the quit message to send to all online players.
classPlayerRespawnEvent
Bases: PlayerEvent
PlayerRespawnEvent()Called when a player respawns.
classPlayerSkinChangeEvent
Bases: PlayerEvent, Cancellable
PlayerSkinChangeEvent()Called when a player changes their skin.
Attributes
| Name | Type | Description |
|---|---|---|
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. |
attrnew_skinproperty
new_skin: SkinGets the player's new skin.
attrskin_change_messageproperty
skin_change_message: str | Translatable | NoneGets or sets the message to send to all online players for this skin change.
classPlayerTeleportEvent
Bases: PlayerMoveEvent
PlayerTeleportEvent()Called when a player is teleported from one location to another.
classPluginDisableEvent
Bases: ServerEvent
PluginDisableEvent()Called when a plugin is disabled.
classPluginEnableEvent
Bases: ServerEvent
PluginEnableEvent()Called when a plugin is enabled.
classScriptMessageEvent
Bases: ServerEvent, Cancellable
ScriptMessageEvent()Called when a message is sent by /scriptevent command
Attributes
| Name | Type | Description |
|---|---|---|
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. |
attrmessageproperty
message: strGet the message to send.
attrmessage_idproperty
message_id: strGet the message id to send.
attrsenderproperty
sender: CommandSenderGets the command sender who initiated the command.
classServerCommandEvent
Bases: ServerEvent, Cancellable
ServerCommandEvent()Called when the console runs a command, early in the process.
Attributes
| Name | Type | Description |
|---|---|---|
command | str | Gets or sets the command that the server will execute |
sender | CommandSender | Get the command sender. |
attrcommandproperty
command: strGets or sets the command that the server will execute
attrsenderproperty
sender: CommandSenderGet the command sender.
classServerEvent
Bases: Event
ServerEvent()Represents a server-related event
classServerListPingEvent
Bases: ServerEvent, Cancellable
ServerListPingEvent()Called when a server ping is coming in.
Attributes
| Name | Type | Description |
|---|---|---|
address | SocketAddress | Get the address the ping is coming from. |
game_mode | GameMode | Gets or sets the current game mode. |
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. |
attraddressproperty
address: SocketAddressGet the address the ping is coming from.
attrgame_modeproperty
game_mode: GameModeGets or sets the current game mode.
attrlevel_nameproperty
level_name: strGets or sets the level name.
attrlocal_portproperty
local_port: intGet or set the local port of the server.
attrlocal_port_v6property
local_port_v6: intGet or set the local port of the server for IPv6 support
attrmax_playersproperty
max_players: intGets or sets the maximum number of players allowed.
attrminecraft_version_networkproperty
minecraft_version_network: strGets or sets the network version of Minecraft that is supported by this server
attrmotdproperty
motd: strGets or sets the message of the day message.
attrnetwork_protocol_versionproperty
network_protocol_version: intGet the network protocol version of this server
attrnum_playersproperty
num_players: intGets or sets the number of players online.
attrserver_guidproperty
server_guid: strGet or set the unique identifier of the server.
classServerLoadEvent
Bases: Event
ServerLoadEvent()Called when either the server startup or reload has completed.
Classes
| Name | Description |
|---|---|
LoadType |
classThunderChangeEvent
Bases: WeatherEvent, Cancellable
ThunderChangeEvent()Called when the thunder state in a world is changing.
Attributes
| Name | Type | Description |
|---|---|---|
to_thunder_state | bool | Gets the state of thunder that the world is being set to |
attrto_thunder_stateproperty
to_thunder_state: boolGets the state of thunder that the world is being set to
classWeatherChangeEvent
Bases: WeatherEvent, Cancellable
WeatherChangeEvent()Called when the weather (rain) state in a world is changing.
Attributes
| Name | Type | Description |
|---|---|---|
to_weather_state | bool | Gets the state of weather that the world is being set to |
attrto_weather_stateproperty
to_weather_state: boolGets the state of weather that the world is being set to
classWeatherEvent
Bases: Event
WeatherEvent()Represents a weather-related event