endstone
Modules
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
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.
Attributes
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.
classLogger
Logger()Logger class which can format and output varies levels of logs.
Classes
| Name | Description |
|---|---|
Level | Specifies the log level. |
Methods
| Name | Description |
|---|---|
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
attrCRITICAL
CRITICALattrDEBUG
DEBUGattrERROR
ERRORattrINFO
INFOattrTRACE
TRACEattrWARNING
WARNINGattrnameproperty
name: strGet the name of this Logger instance.
classLevel
Bases: IntEnum
Level()Specifies the log level.
methcritical
critical(message: str) -> NoneLog a message at the CRITICAL level.
methdebug
debug(message: str) -> NoneLog a message at the DEBUG level.
metherror
error(message: str) -> NoneLog a message at the ERROR level.
methinfo
info(message: str) -> NoneLog a message at the INFO level.
methis_enabled_for
Check if the Logger instance is enabled for the given log Level.
methset_level
set_level(level: Level) -> NoneSet the logging level for this Logger instance.
methtrace
trace(message: str) -> NoneLog a message at the TRACE level.
methwarning
warning(message: str) -> NoneLog 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
classPlayer
Bases: Mob, OfflinePlayer
Player()Represents a player.
Methods
| Name | Description |
|---|---|
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
| Name | Type | Description |
|---|---|---|
address | SocketAddress | Gets the socket address of this player |
allow_flight | bool | If the Player is allowed to fly via jump key double-tap. |
device_id | str | Get the player's current device id. |
device_os | str | Get the player's current device's operation system (OS). |
ender_chest | Inventory | Get the player's EnderChest inventory. |
exp_level | int | Gets or sets the players current experience level. |
exp_progress | float | Gets or sets the players current experience progress towards the next level. |
fly_speed | float | Gets or sets the current allowed speed that a client can fly. |
game_mode | GameMode | The player's current game mode. |
game_version | str | Get the player's current game version. |
inventory | PlayerInventory | Get the player's inventory. |
is_flying | bool | If the player is currently flying or not. |
is_op | bool | The operator status of this playerall |
is_sneaking | bool | Gets or sets the sneak mode of the player |
is_sprinting | bool | Gets or sets whether the player is sprinting or not. |
locale | str | Get the player's current locale. |
name | str | Returns the name of this player |
ping | int | Gets the player's average ping in milliseconds. |
scoreboard | Scoreboard | Gets or sets the player's visible Scoreboard. |
skin | Skin | Get the player's skin. |
total_exp | int | Gets the players total experience points. |
unique_id | UUID | Returns the UUID of this player |
walk_speed | float | Gets or sets the current allowed speed that a client can walk. |
xuid | str | Returns the Xbox User ID (XUID) of this player |
attraddressproperty
address: SocketAddressGets the socket address of this player
attrallow_flightproperty
allow_flight: boolIf the Player is allowed to fly via jump key double-tap.
attrdevice_idproperty
device_id: strGet the player's current device id.
attrdevice_osproperty
device_os: strGet the player's current device's operation system (OS).
attrender_chestproperty
ender_chest: InventoryGet the player's EnderChest inventory.
attrexp_levelproperty
exp_level: intGets or sets the players current experience level.
attrexp_progressproperty
exp_progress: floatGets or sets the players current experience progress towards the next level.
attrfly_speedproperty
fly_speed: floatGets or sets the current allowed speed that a client can fly.
attrgame_modeproperty
game_mode: GameModeThe player's current game mode.
attrgame_versionproperty
game_version: strGet the player's current game version.
attrinventoryproperty
inventory: PlayerInventoryGet the player's inventory.
attris_flyingproperty
is_flying: boolIf the player is currently flying or not.
attris_opproperty
is_op: boolThe operator status of this playerall
attris_sneakingproperty
is_sneaking: boolGets or sets the sneak mode of the player
attris_sprintingproperty
is_sprinting: boolGets or sets whether the player is sprinting or not.
attrlocaleproperty
locale: strGet the player's current locale.
attrnameproperty
name: strReturns the name of this player
attrpingproperty
ping: intGets the player's average ping in milliseconds.
attrscoreboardproperty
scoreboard: ScoreboardGets or sets the player's visible Scoreboard.
attrskinproperty
skin: SkinGet the player's skin.
attrtotal_expproperty
total_exp: intGets the players total experience points.
attrunique_idproperty
unique_id: UUIDReturns the UUID of this player
attrwalk_speedproperty
walk_speed: floatGets or sets the current allowed speed that a client can walk.
attrxuidproperty
xuid: strReturns the Xbox User ID (XUID) of this player
methclose_form
close_form() -> NoneCloses the forms that are currently open for the player.
methgive_exp
give_exp(amount: int) -> NoneGives the player the amount of experience specified.
methgive_exp_levels
give_exp_levels(amount: int) -> NoneGives the player the amount of experience levels specified.
methkick
kick(message: str) -> NoneKicks player with custom kick message.
methperform_command
Makes the player perform the given command.
methplay_sound
Play a sound for a player at the location.
methreset_title
reset_title() -> NoneResets 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) -> NoneSends a form to the player.
methsend_map
send_map(map: MapView) -> NoneRender 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
Sends a packet to the player.
methsend_popup
send_popup(message: str) -> NoneSends this player a popup message
methsend_tip
send_tip(message: str) -> NoneSends this player a tip message
methsend_title
Sends a title and a subtitle message to the player. If they are empty strings, the display will be updated as such.
methsend_toast
Sends this player a toast notification.
methstop_all_sounds
stop_all_sounds() -> NoneStop all sounds from playing.
methstop_sound
stop_sound(sound: str) -> NoneStop the specified sound from playing.
methtransfer
Transfers the player to another server.
methupdate_commands
update_commands() -> NoneSend the list of commands to the client.
classRegistry
Bases: Generic[_T]
Registry()Presents a registry
Methods
| Name | Description |
|---|---|
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 | NoneGet the object by its key.
methget_or_throw
get_or_throw(key: str) -> _TGet the object by its key or throw if missing.
classServer
Server()Represents a server implementation.
Methods
| Name | Description |
|---|---|
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
| Name | Type | Description |
|---|---|---|
average_mspt | float | Gets the average milliseconds per tick (MSPT). |
average_tick_usage | float | Gets the average tick usage of the server. |
average_tps | float | Gets the average ticks per second (TPS). |
ban_list | PlayerBanList | Gets the player ban list. |
command_sender | ConsoleCommandSender | Gets a CommandSender for this server. |
current_mspt | float | Gets the current milliseconds per tick (MSPT). |
current_tick_usage | float | Gets the current tick usage of the server. |
current_tps | float | Gets the current ticks per second (TPS). |
ip_ban_list | IpBanList | Gets the IP ban list. |
item_factory | ItemFactory | Gets the instance of the item factory (for ItemMeta). |
language | Language | Gets the current language interface used by the server. |
level | Level | Gets the server level. |
logger | Logger | Returns the primary logger associated with this server instance. |
max_players | int | The maximum amount of players which can login to this server. |
minecraft_version | str | Gets the Minecraft version that this server is running. |
name | str | Gets the name of this server implementation. |
online_mode | bool | Gets whether the Server is in online mode or not. |
online_players | list[Player] | Gets a list of all currently online players. |
plugin_manager | PluginManager | Gets the plugin manager for interfacing with plugins. |
port | int | Get the game port that the server runs on. |
port_v6 | int | Get the game port (IPv6) that the server runs on. |
protocol_version | int | Gets the network protocol version that this server supports. |
scheduler | Scheduler | Gets the scheduler for managing scheduled events. |
scoreboard | Scoreboard | Gets the primary Scoreboard controlled by the server. |
service_manager | ServiceManager | Gets the service manager. |
start_time | datetime | Gets the start time of the server. |
version | str | Gets the version of this server implementation. |
attraverage_msptproperty
average_mspt: floatGets the average milliseconds per tick (MSPT).
attraverage_tick_usageproperty
average_tick_usage: floatGets the average tick usage of the server.
attraverage_tpsproperty
average_tps: floatGets the average ticks per second (TPS).
attrban_listproperty
ban_list: PlayerBanListGets the player ban list.
attrcommand_senderproperty
command_sender: ConsoleCommandSenderGets a CommandSender for this server.
attrcurrent_msptproperty
current_mspt: floatGets the current milliseconds per tick (MSPT).
attrcurrent_tick_usageproperty
current_tick_usage: floatGets the current tick usage of the server.
attrcurrent_tpsproperty
current_tps: floatGets the current ticks per second (TPS).
attrip_ban_listproperty
ip_ban_list: IpBanListGets the IP ban list.
attritem_factoryproperty
item_factory: ItemFactoryGets the instance of the item factory (for ItemMeta).
attrlanguageproperty
language: LanguageGets the current language interface used by the server.
attrlevelproperty
level: LevelGets the server level.
attrloggerproperty
logger: LoggerReturns the primary logger associated with this server instance.
attrmax_playersproperty
max_players: intThe maximum amount of players which can login to this server.
attrminecraft_versionproperty
minecraft_version: strGets the Minecraft version that this server is running.
attrnameproperty
name: strGets the name of this server implementation.
attronline_modeproperty
online_mode: boolGets whether the Server is in online mode or not.
attronline_playersproperty
Gets a list of all currently online players.
attrplugin_managerproperty
plugin_manager: PluginManagerGets the plugin manager for interfacing with plugins.
attrportproperty
port: intGet the game port that the server runs on.
attrport_v6property
port_v6: intGet the game port (IPv6) that the server runs on.
attrprotocol_versionproperty
protocol_version: intGets the network protocol version that this server supports.
attrschedulerproperty
scheduler: SchedulerGets the scheduler for managing scheduled events.
attrscoreboardproperty
scoreboard: ScoreboardGets the primary Scoreboard controlled by the server.
attrservice_managerproperty
service_manager: ServiceManagerGets the service manager.
attrstart_timeproperty
start_time: datetimeGets the start time of the server.
attrversionproperty
version: strGets the version of this server implementation.
methbroadcast
broadcast(message: str | Translatable, permission: str) -> NoneBroadcasts the specified message to every user with the given permission name.
methbroadcast_message
broadcast_message(message: str | Translatable) -> NoneBroadcasts the specified message to every user with permission endstone.broadcast.user
methcreate_block_data
Creates a new BlockData instance for the specified block type, with all properties initialized to defaults, except for those provided.
methcreate_boss_bar
Creates a boss bar instance to display to players. The progress defaults to 1.0.
methcreate_map
Create a new map with an automatically assigned ID.
methcreate_scoreboard
create_scoreboard() -> ScoreboardCreates a new Scoreboard to be tracked by the server.
methdispatch_command
dispatch_command(sender: CommandSender, command_line: str) -> boolDispatches a command on this server, and executes it if found.
methget_map
Gets the map from the given map ID.
methget_plugin_command
get_plugin_command(name: str) -> PluginCommandGets a PluginCommand with the given name or alias.
methget_registry
Returns the registry for all the enchantments.
methreload
reload() -> NoneReloads the server configuration, functions, scripts and plugins.
methreload_data
reload_data() -> NoneReload only the Minecraft data for the server.
methshutdown
shutdown() -> NoneShutdowns the server, stopping everything.
classSkin
Represents a player skin.
Attributes