endstone

Modules

NameDescription
actor

Classes relating to actors (entities) that can exist in a world, including all players, monsters, projectiles, etc.

asyncio
attribute

Classes relevant to attributes.

ban

Classes relevant to bans.

block

Classes relating to the blocks in a world, including special states.

boss

Classes relating to the boss bars that appear at the top of the player's screen.

cli
command

Classes relating to handling specialized non-chat player input.

damage

Classes relating to damage types and sources applicable to mobs (living entities).

effect

Classes relating to the effects that can be applied to entities.

enchantments

Classes relating to the specialized enhancements to ItemStacks.

event

Classes relating to handling triggered code executions.

form
inventory

Classes relating to player inventories and item interactions.

lang
level
map

Classes relating to plugin handling of map displays.

metrics
nbt

Classes relating to the NBT data format.

permissions

Classes relating to permissions of players.

plugin

Classes relating to loading and managing plugins.

potion

Classes relating to potion effects.

scheduler

Classes relating to letting plugins run code at specific time intervals.

scoreboard

Classes relating to manage the client side score display system.

util

Multi and single purpose classes.

Classes

NameDescription
ColorFormat

All supported color and format codes.

GameMode

Represents the various type of game modes that Players may have.

Logger

Logger class which can format and output varies levels of logs.

OfflinePlayer

Represents a reference to a player identity and the data belonging to a player that is stored on the disk and can, thus, be retrieved without the player needing to be online.

Player

Represents a player.

Registry

Presents a registry

Server

Represents a server implementation.

Skin

Represents a player skin.

classColorFormat

ColorFormat()

All supported color and format codes.

attrAQUA

AQUA = '§b'

attrBLACK

BLACK = '§0'

attrBLUE

BLUE = '§9'

attrBOLD

BOLD = '§l'

attrDARK_AQUA

DARK_AQUA = '§3'

attrDARK_BLUE

DARK_BLUE = '§1'

attrDARK_GRAY

DARK_GRAY = '§8'

attrDARK_GREEN

DARK_GREEN = '§2'

attrDARK_PURPLE

DARK_PURPLE = '§5'

attrDARK_RED

DARK_RED = '§4'

attrGOLD

GOLD = '§6'

attrGRAY

GRAY = '§7'

attrGREEN

GREEN = '§a'

attrITALIC

ITALIC = '§o'

attrLIGHT_PURPLE

LIGHT_PURPLE = '§d'

attrMATERIAL_AMETHYST

MATERIAL_AMETHYST = '§u'

attrMATERIAL_COPPER

MATERIAL_COPPER = '§n'

attrMATERIAL_DIAMOND

MATERIAL_DIAMOND = '§s'

attrMATERIAL_EMERALD

MATERIAL_EMERALD = '§q'

attrMATERIAL_GOLD

MATERIAL_GOLD = '§p'

attrMATERIAL_IRON

MATERIAL_IRON = '§i'

attrMATERIAL_LAPIS

MATERIAL_LAPIS = '§t'

attrMATERIAL_NETHERITE

MATERIAL_NETHERITE = '§j'

attrMATERIAL_QUARTZ

MATERIAL_QUARTZ = '§h'

attrMATERIAL_REDSTONE

MATERIAL_REDSTONE = '§m'

attrMATERIAL_RESIN

MATERIAL_RESIN = '§v'

attrMINECOIN_GOLD

MINECOIN_GOLD = '§g'

attrOBFUSCATED

OBFUSCATED = '§k'

attrRED

RED = '§c'

attrRESET

RESET = '§r'

attrWHITE

WHITE = '§f'

attrYELLOW

YELLOW = '§e'

classGameMode

Bases: Enum

GameMode()

Represents the various type of game modes that Players may have.

Attributes

attrADVENTURE

ADVENTURE = 2

attrCREATIVE

CREATIVE = 1

attrSPECTATOR

SPECTATOR = 3

attrSURVIVAL

SURVIVAL = 0

classLogger

Logger()

Logger class which can format and output varies levels of logs.

Classes

NameDescription
Level

Specifies the log level.

Methods

NameDescription
critical

Log a message at the CRITICAL level.

debug

Log a message at the DEBUG level.

error

Log a message at the ERROR level.

info

Log a message at the INFO level.

is_enabled_for

Check if the Logger instance is enabled for the given log Level.

set_level

Set the logging level for this Logger instance.

trace

Log a message at the TRACE level.

warning

Log a message at the WARNING level.

Attributes

NameTypeDescription
CRITICAL
DEBUG
ERROR
INFO
TRACE
WARNING
namestr

Get the name of this Logger instance.

attrCRITICAL

CRITICAL

attrDEBUG

DEBUG

attrERROR

ERROR

attrINFO

INFO

attrTRACE

TRACE

attrWARNING

WARNING

attrnameproperty

name: str

Get the name of this Logger instance.

classLevel

Bases: IntEnum

Level()

Specifies the log level.

Attributes

attrCRITICAL

CRITICAL = 5

attrDEBUG

DEBUG = 1

attrERROR

ERROR = 4

attrINFO

INFO = 2

attrTRACE

TRACE = 0

attrWARNING

WARNING = 3

methcritical

critical(message: str) -> None

Log a message at the CRITICAL level.

methdebug

debug(message: str) -> None

Log a message at the DEBUG level.

metherror

error(message: str) -> None

Log a message at the ERROR level.

methinfo

info(message: str) -> None

Log a message at the INFO level.

methis_enabled_for

is_enabled_for(level: Level) -> bool

Check if the Logger instance is enabled for the given log Level.

methset_level

set_level(level: Level) -> None

Set the logging level for this Logger instance.

methtrace

trace(message: str) -> None

Log a message at the TRACE level.

methwarning

warning(message: str) -> None

Log a message at the WARNING level.

classOfflinePlayer

OfflinePlayer()

Represents a reference to a player identity and the data belonging to a player that is stored on the disk and can, thus, be retrieved without the player needing to be online.

Attributes

NameTypeDescription
namestr

Returns the name of this player

unique_idUUID

Returns the UUID of this player

attrnameproperty

name: str

Returns the name of this player

attrunique_idproperty

unique_id: UUID

Returns the UUID of this player

classPlayer

Bases: Mob, OfflinePlayer

Player()

Represents a player.

Methods

NameDescription
close_form

Closes the forms that are currently open for the player.

give_exp

Gives the player the amount of experience specified.

give_exp_levels

Gives the player the amount of experience levels specified.

kick

Kicks player with custom kick message.

perform_command

Makes the player perform the given command.

play_sound

Play a sound for a player at the location.

reset_title

Resets the title displayed to the player. This will clear the displayed title / subtitle and reset timings to their default values.

send_form

Sends a form to the player.

send_map

Render a map and send it to the player in its entirety.

send_packet

Sends a packet to the player.

send_popup

Sends this player a popup message

send_tip

Sends this player a tip message

send_title

Sends a title and a subtitle message to the player. If they are empty strings, the display will be updated as such.

send_toast

Sends this player a toast notification.

stop_all_sounds

Stop all sounds from playing.

stop_sound

Stop the specified sound from playing.

transfer

Transfers the player to another server.

update_commands

Send the list of commands to the client.

Attributes

NameTypeDescription
addressSocketAddress

Gets the socket address of this player

allow_flightbool

If the Player is allowed to fly via jump key double-tap.

device_idstr

Get the player's current device id.

device_osstr

Get the player's current device's operation system (OS).

ender_chestInventory

Get the player's EnderChest inventory.

exp_levelint

Gets or sets the players current experience level.

exp_progressfloat

Gets or sets the players current experience progress towards the next level.

fly_speedfloat

Gets or sets the current allowed speed that a client can fly.

game_modeGameMode

The player's current game mode.

game_versionstr

Get the player's current game version.

inventoryPlayerInventory

Get the player's inventory.

is_flyingbool

If the player is currently flying or not.

is_opbool

The operator status of this playerall

is_sneakingbool

Gets or sets the sneak mode of the player

is_sprintingbool

Gets or sets whether the player is sprinting or not.

localestr

Get the player's current locale.

namestr

Returns the name of this player

pingint

Gets the player's average ping in milliseconds.

scoreboardScoreboard

Gets or sets the player's visible Scoreboard.

skinSkin

Get the player's skin.

total_expint

Gets the players total experience points.

unique_idUUID

Returns the UUID of this player

walk_speedfloat

Gets or sets the current allowed speed that a client can walk.

xuidstr

Returns the Xbox User ID (XUID) of this player

attraddressproperty

address: SocketAddress

Gets the socket address of this player

attrallow_flightproperty

allow_flight: bool

If the Player is allowed to fly via jump key double-tap.

attrdevice_idproperty

device_id: str

Get the player's current device id.

attrdevice_osproperty

device_os: str

Get the player's current device's operation system (OS).

attrender_chestproperty

ender_chest: Inventory

Get the player's EnderChest inventory.

attrexp_levelproperty

exp_level: int

Gets or sets the players current experience level.

attrexp_progressproperty

exp_progress: float

Gets or sets the players current experience progress towards the next level.

attrfly_speedproperty

fly_speed: float

Gets or sets the current allowed speed that a client can fly.

attrgame_modeproperty

game_mode: GameMode

The player's current game mode.

attrgame_versionproperty

game_version: str

Get the player's current game version.

attrinventoryproperty

inventory: PlayerInventory

Get the player's inventory.

attris_flyingproperty

is_flying: bool

If the player is currently flying or not.

attris_opproperty

is_op: bool

The operator status of this playerall

attris_sneakingproperty

is_sneaking: bool

Gets or sets the sneak mode of the player

attris_sprintingproperty

is_sprinting: bool

Gets or sets whether the player is sprinting or not.

attrlocaleproperty

locale: str

Get the player's current locale.

attrnameproperty

name: str

Returns the name of this player

attrpingproperty

ping: int

Gets the player's average ping in milliseconds.

attrscoreboardproperty

scoreboard: Scoreboard

Gets or sets the player's visible Scoreboard.

attrskinproperty

skin: Skin

Get the player's skin.

attrtotal_expproperty

total_exp: int

Gets the players total experience points.

attrunique_idproperty

unique_id: UUID

Returns the UUID of this player

attrwalk_speedproperty

walk_speed: float

Gets or sets the current allowed speed that a client can walk.

attrxuidproperty

xuid: str

Returns the Xbox User ID (XUID) of this player

methclose_form

close_form() -> None

Closes the forms that are currently open for the player.

methgive_exp

give_exp(amount: int) -> None

Gives the player the amount of experience specified.

methgive_exp_levels

give_exp_levels(amount: int) -> None

Gives the player the amount of experience levels specified.

methkick

kick(message: str) -> None

Kicks player with custom kick message.

methperform_command

perform_command(command: str) -> bool

Makes the player perform the given command.

methplay_sound

play_sound(location: Location, sound: str, volume: float = 1.0, pitch: float = 1.0) -> None

Play a sound for a player at the location.

methreset_title

reset_title() -> None

Resets the title displayed to the player. This will clear the displayed title / subtitle and reset timings to their default values.

methsend_form

send_form(form: MessageForm | ActionForm | ModalForm) -> None

Sends a form to the player.

methsend_map

send_map(map: MapView) -> None

Render a map and send it to the player in its entirety.

This may be used when streaming the map in the normal manner is not desirable.

methsend_packet

send_packet(packet_id: int, payload: bytes) -> None

Sends a packet to the player.

methsend_popup

send_popup(message: str) -> None

Sends this player a popup message

methsend_tip

send_tip(message: str) -> None

Sends this player a tip message

methsend_title

send_title(title: str, subtitle: str, fade_in: int = 10, stay: int = 70, fade_out: int = 20) -> None

Sends a title and a subtitle message to the player. If they are empty strings, the display will be updated as such.

methsend_toast

send_toast(title: str, content: str) -> None

Sends this player a toast notification.

methstop_all_sounds

stop_all_sounds() -> None

Stop all sounds from playing.

methstop_sound

stop_sound(sound: str) -> None

Stop the specified sound from playing.

methtransfer

transfer(host: str, port: int = 19132) -> None

Transfers the player to another server.

methupdate_commands

update_commands() -> None

Send the list of commands to the client.

classRegistry

Bases: Generic[_T]

Registry()

Presents a registry

Methods

NameDescription
get

Get the object by its key.

get_or_throw

Get the object by its key or throw if missing.

methget

get(key: str) -> _T | None

Get the object by its key.

methget_or_throw

get_or_throw(key: str) -> _T

Get the object by its key or throw if missing.

classServer

Server()

Represents a server implementation.

Methods

NameDescription
broadcast

Broadcasts the specified message to every user with the given permission name.

broadcast_message

Broadcasts the specified message to every user with permission endstone.broadcast.user

create_block_data

Creates a new BlockData instance for the specified block type, with all properties initialized to defaults, except for those provided.

create_boss_bar

Creates a boss bar instance to display to players. The progress defaults to 1.0.

create_map

Create a new map with an automatically assigned ID.

create_scoreboard

Creates a new Scoreboard to be tracked by the server.

dispatch_command

Dispatches a command on this server, and executes it if found.

get_map

Gets the map from the given map ID.

get_plugin_command

Gets a PluginCommand with the given name or alias.

get_registry

Returns the registry for all the enchantments.

reload

Reloads the server configuration, functions, scripts and plugins.

reload_data

Reload only the Minecraft data for the server.

shutdown

Shutdowns the server, stopping everything.

Attributes

NameTypeDescription
average_msptfloat

Gets the average milliseconds per tick (MSPT).

average_tick_usagefloat

Gets the average tick usage of the server.

average_tpsfloat

Gets the average ticks per second (TPS).

ban_listPlayerBanList

Gets the player ban list.

command_senderConsoleCommandSender

Gets a CommandSender for this server.

current_msptfloat

Gets the current milliseconds per tick (MSPT).

current_tick_usagefloat

Gets the current tick usage of the server.

current_tpsfloat

Gets the current ticks per second (TPS).

ip_ban_listIpBanList

Gets the IP ban list.

item_factoryItemFactory

Gets the instance of the item factory (for ItemMeta).

languageLanguage

Gets the current language interface used by the server.

levelLevel

Gets the server level.

loggerLogger

Returns the primary logger associated with this server instance.

max_playersint

The maximum amount of players which can login to this server.

minecraft_versionstr

Gets the Minecraft version that this server is running.

namestr

Gets the name of this server implementation.

online_modebool

Gets whether the Server is in online mode or not.

online_playerslist[Player]

Gets a list of all currently online players.

plugin_managerPluginManager

Gets the plugin manager for interfacing with plugins.

portint

Get the game port that the server runs on.

port_v6int

Get the game port (IPv6) that the server runs on.

protocol_versionint

Gets the network protocol version that this server supports.

schedulerScheduler

Gets the scheduler for managing scheduled events.

scoreboardScoreboard

Gets the primary Scoreboard controlled by the server.

service_managerServiceManager

Gets the service manager.

start_timedatetime

Gets the start time of the server.

versionstr

Gets the version of this server implementation.

attraverage_msptproperty

average_mspt: float

Gets the average milliseconds per tick (MSPT).

attraverage_tick_usageproperty

average_tick_usage: float

Gets the average tick usage of the server.

attraverage_tpsproperty

average_tps: float

Gets the average ticks per second (TPS).

attrban_listproperty

ban_list: PlayerBanList

Gets the player ban list.

attrcommand_senderproperty

command_sender: ConsoleCommandSender

Gets a CommandSender for this server.

attrcurrent_msptproperty

current_mspt: float

Gets the current milliseconds per tick (MSPT).

attrcurrent_tick_usageproperty

current_tick_usage: float

Gets the current tick usage of the server.

attrcurrent_tpsproperty

current_tps: float

Gets the current ticks per second (TPS).

attrip_ban_listproperty

ip_ban_list: IpBanList

Gets the IP ban list.

attritem_factoryproperty

item_factory: ItemFactory

Gets the instance of the item factory (for ItemMeta).

attrlanguageproperty

language: Language

Gets the current language interface used by the server.

attrlevelproperty

level: Level

Gets the server level.

attrloggerproperty

logger: Logger

Returns the primary logger associated with this server instance.

attrmax_playersproperty

max_players: int

The maximum amount of players which can login to this server.

attrminecraft_versionproperty

minecraft_version: str

Gets the Minecraft version that this server is running.

attrnameproperty

name: str

Gets the name of this server implementation.

attronline_modeproperty

online_mode: bool

Gets whether the Server is in online mode or not.

attronline_playersproperty

online_players: list[Player]

Gets a list of all currently online players.

attrplugin_managerproperty

plugin_manager: PluginManager

Gets the plugin manager for interfacing with plugins.

attrportproperty

port: int

Get the game port that the server runs on.

attrport_v6property

port_v6: int

Get the game port (IPv6) that the server runs on.

attrprotocol_versionproperty

protocol_version: int

Gets the network protocol version that this server supports.

attrschedulerproperty

scheduler: Scheduler

Gets the scheduler for managing scheduled events.

attrscoreboardproperty

scoreboard: Scoreboard

Gets the primary Scoreboard controlled by the server.

attrservice_managerproperty

service_manager: ServiceManager

Gets the service manager.

attrstart_timeproperty

start_time: datetime

Gets the start time of the server.

attrversionproperty

version: str

Gets the version of this server implementation.

methbroadcast

broadcast(message: str | Translatable, permission: str) -> None

Broadcasts the specified message to every user with the given permission name.

methbroadcast_message

broadcast_message(message: str | Translatable) -> None

Broadcasts the specified message to every user with permission endstone.broadcast.user

methcreate_block_data

create_block_data(type: str, block_states: Mapping[str, bool | str | int] | None = None) -> BlockData

Creates a new BlockData instance for the specified block type, with all properties initialized to defaults, except for those provided.

methcreate_boss_bar

create_boss_bar(title: str, color: BarColor, style: BarStyle, flags: list[BarFlag] | None = None) -> BossBar

Creates a boss bar instance to display to players. The progress defaults to 1.0.

methcreate_map

create_map(dimension: Dimension) -> MapView

Create a new map with an automatically assigned ID.

methcreate_scoreboard

create_scoreboard() -> Scoreboard

Creates a new Scoreboard to be tracked by the server.

methdispatch_command

dispatch_command(sender: CommandSender, command_line: str) -> bool

Dispatches a command on this server, and executes it if found.

methget_map

get_map(id: int) -> MapView

Gets the map from the given map ID.

methget_plugin_command

get_plugin_command(name: str) -> PluginCommand

Gets a PluginCommand with the given name or alias.

methget_registry

get_registry(type: Type[_T]) -> Registry[_T]

Returns the registry for all the enchantments.

methreload

reload() -> None

Reloads the server configuration, functions, scripts and plugins.

methreload_data

reload_data() -> None

Reload only the Minecraft data for the server.

methshutdown

shutdown() -> None

Shutdowns the server, stopping everything.

classSkin

Skin(id: str, image: ndarray[uint8], cape_id: str | None = None, cape_image: ndarray[uint8] | None = None)

Represents a player skin.

Attributes

NameTypeDescription
cape_idstr | None

Get the Cape ID.

cape_imagendarray[uint8]

Get the Cape image.

idstr

Get the Skin ID.

imagendarray[uint8]

Get the Skin image.

attrcape_idproperty

cape_id: str | None

Get the Cape ID.

attrcape_imageproperty

cape_image: ndarray[uint8]

Get the Cape image.

attridproperty

id: str

Get the Skin ID.

attrimageproperty

image: ndarray[uint8]

Get the Skin image.

On this page

classColorFormatattrAQUAattrBLACKattrBLUEattrBOLDattrDARK_AQUAattrDARK_BLUEattrDARK_GRAYattrDARK_GREENattrDARK_PURPLEattrDARK_REDattrGOLDattrGRAYattrGREENattrITALICattrLIGHT_PURPLEattrMATERIAL_AMETHYSTattrMATERIAL_COPPERattrMATERIAL_DIAMONDattrMATERIAL_EMERALDattrMATERIAL_GOLDattrMATERIAL_IRONattrMATERIAL_LAPISattrMATERIAL_NETHERITEattrMATERIAL_QUARTZattrMATERIAL_REDSTONEattrMATERIAL_RESINattrMINECOIN_GOLDattrOBFUSCATEDattrREDattrRESETattrWHITEattrYELLOWclassGameModeattrADVENTUREattrCREATIVEattrSPECTATORattrSURVIVALclassLoggerattrCRITICALattrDEBUGattrERRORattrINFOattrTRACEattrWARNINGattrnameclassLevelattrCRITICALattrDEBUGattrERRORattrINFOattrTRACEattrWARNINGmethcriticalmethdebugmetherrormethinfomethis_enabled_formethset_levelmethtracemethwarningclassOfflinePlayerattrnameattrunique_idclassPlayerattraddressattrallow_flightattrdevice_idattrdevice_osattrender_chestattrexp_levelattrexp_progressattrfly_speedattrgame_modeattrgame_versionattrinventoryattris_flyingattris_opattris_sneakingattris_sprintingattrlocaleattrnameattrpingattrscoreboardattrskinattrtotal_expattrunique_idattrwalk_speedattrxuidmethclose_formmethgive_expmethgive_exp_levelsmethkickmethperform_commandmethplay_soundmethreset_titlemethsend_formmethsend_mapmethsend_packetmethsend_popupmethsend_tipmethsend_titlemethsend_toastmethstop_all_soundsmethstop_soundmethtransfermethupdate_commandsclassRegistrymethgetmethget_or_throwclassServerattraverage_msptattraverage_tick_usageattraverage_tpsattrban_listattrcommand_senderattrcurrent_msptattrcurrent_tick_usageattrcurrent_tpsattrip_ban_listattritem_factoryattrlanguageattrlevelattrloggerattrmax_playersattrminecraft_versionattrnameattronline_modeattronline_playersattrplugin_managerattrportattrport_v6attrprotocol_versionattrschedulerattrscoreboardattrservice_managerattrstart_timeattrversionmethbroadcastmethbroadcast_messagemethcreate_block_datamethcreate_boss_barmethcreate_mapmethcreate_scoreboardmethdispatch_commandmethget_mapmethget_plugin_commandmethget_registrymethreloadmethreload_datamethshutdownclassSkinattrcape_idattrcape_imageattridattrimage