Skip to content

Miscellaneous

endstone.ColorFormat

All supported color and format codes.

Attributes:

Name Type Description
AQUA
BLACK
BLUE
BOLD
DARK_AQUA
DARK_BLUE
DARK_GRAY
DARK_GREEN
DARK_PURPLE
DARK_RED
GOLD
GRAY
GREEN
ITALIC
LIGHT_PURPLE
MATERIAL_AMETHYST
MATERIAL_COPPER
MATERIAL_DIAMOND
MATERIAL_EMERALD
MATERIAL_GOLD
MATERIAL_IRON
MATERIAL_LAPIS
MATERIAL_NETHERITE
MATERIAL_QUARTZ
MATERIAL_REDSTONE
MATERIAL_RESIN
MINECOIN_GOLD
OBFUSCATED
RED
RESET
WHITE
YELLOW

AQUA class-attribute instance-attribute

AQUA = '§b'

BLACK class-attribute instance-attribute

BLACK = '§0'

BLUE class-attribute instance-attribute

BLUE = '§9'

BOLD class-attribute instance-attribute

BOLD = '§l'

DARK_AQUA class-attribute instance-attribute

DARK_AQUA = '§3'

DARK_BLUE class-attribute instance-attribute

DARK_BLUE = '§1'

DARK_GRAY class-attribute instance-attribute

DARK_GRAY = '§8'

DARK_GREEN class-attribute instance-attribute

DARK_GREEN = '§2'

DARK_PURPLE class-attribute instance-attribute

DARK_PURPLE = '§5'

DARK_RED class-attribute instance-attribute

DARK_RED = '§4'

GOLD class-attribute instance-attribute

GOLD = '§6'

GRAY class-attribute instance-attribute

GRAY = '§7'

GREEN class-attribute instance-attribute

GREEN = '§a'

ITALIC class-attribute instance-attribute

ITALIC = '§o'

LIGHT_PURPLE class-attribute instance-attribute

LIGHT_PURPLE = '§d'

MATERIAL_AMETHYST class-attribute instance-attribute

MATERIAL_AMETHYST = '§u'

MATERIAL_COPPER class-attribute instance-attribute

MATERIAL_COPPER = '§n'

MATERIAL_DIAMOND class-attribute instance-attribute

MATERIAL_DIAMOND = '§s'

MATERIAL_EMERALD class-attribute instance-attribute

MATERIAL_EMERALD = '§q'

MATERIAL_GOLD class-attribute instance-attribute

MATERIAL_GOLD = '§p'

MATERIAL_IRON class-attribute instance-attribute

MATERIAL_IRON = '§i'

MATERIAL_LAPIS class-attribute instance-attribute

MATERIAL_LAPIS = '§t'

MATERIAL_NETHERITE class-attribute instance-attribute

MATERIAL_NETHERITE = '§j'

MATERIAL_QUARTZ class-attribute instance-attribute

MATERIAL_QUARTZ = '§h'

MATERIAL_REDSTONE class-attribute instance-attribute

MATERIAL_REDSTONE = '§m'

MATERIAL_RESIN class-attribute instance-attribute

MATERIAL_RESIN = '§v'

MINECOIN_GOLD class-attribute instance-attribute

MINECOIN_GOLD = '§g'

OBFUSCATED class-attribute instance-attribute

OBFUSCATED = '§k'

RED class-attribute instance-attribute

RED = '§c'

RESET class-attribute instance-attribute

RESET = '§r'

WHITE class-attribute instance-attribute

WHITE = '§f'

YELLOW class-attribute instance-attribute

YELLOW = '§e'

endstone.EnchantmentRegistry

Server enchantments.

Methods:

Name Description
get

Get the object by its key.

get_or_throw

Get the object by its key or throw if missing.

get

get(key: str) -> Enchantment

Get the object by its key.

get_or_throw

get_or_throw(key: str) -> Enchantment

Get the object by its key or throw if missing.

endstone.GameMode

Bases: Enum

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

Attributes:

Name Type Description
ADVENTURE
CREATIVE
SPECTATOR
SURVIVAL

ADVENTURE class-attribute instance-attribute

ADVENTURE = 2

CREATIVE class-attribute instance-attribute

CREATIVE = 1

SPECTATOR class-attribute instance-attribute

SPECTATOR = 3

SURVIVAL class-attribute instance-attribute

SURVIVAL = 0

endstone.ItemRegistry

Server item types。

Methods:

Name Description
get

Get the object by its key.

get_or_throw

Get the object by its key or throw if missing.

get

get(key: str) -> ItemType

Get the object by its key.

get_or_throw

get_or_throw(key: str) -> ItemType

Get the object by its key or throw if missing.

endstone.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:

Name Type Description
CRITICAL
DEBUG
ERROR
INFO
TRACE
WARNING
name str

Get the name of this Logger instance.

CRITICAL class-attribute instance-attribute

CRITICAL = CRITICAL

DEBUG class-attribute instance-attribute

DEBUG = DEBUG

ERROR class-attribute instance-attribute

ERROR = ERROR

INFO class-attribute instance-attribute

INFO = INFO

TRACE class-attribute instance-attribute

TRACE = TRACE

WARNING class-attribute instance-attribute

WARNING = WARNING

name property

name: str

Get the name of this Logger instance.

Level

Bases: IntEnum

Specifies the log level.

Attributes:

Name Type Description
CRITICAL
DEBUG
ERROR
INFO
TRACE
WARNING

CRITICAL class-attribute instance-attribute

CRITICAL = 5

DEBUG class-attribute instance-attribute

DEBUG = 1

ERROR class-attribute instance-attribute

ERROR = 4

INFO class-attribute instance-attribute

INFO = 2

TRACE class-attribute instance-attribute

TRACE = 0

WARNING class-attribute instance-attribute

WARNING = 3

critical

critical(message: str) -> None

Log a message at the CRITICAL level.

debug

debug(message: str) -> None

Log a message at the DEBUG level.

error

error(message: str) -> None

Log a message at the ERROR level.

info

info(message: str) -> None

Log a message at the INFO level.

is_enabled_for

is_enabled_for(level: Level) -> bool

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

set_level

set_level(level: Level) -> None

Set the logging level for this Logger instance.

trace

trace(message: str) -> None

Log a message at the TRACE level.

warning

warning(message: str) -> None

Log a message at the WARNING level.

endstone.util

Multi and single purpose classes.

Classes:

Name Description
SocketAddress

Represents an IP Socket Address (hostname + port number).

Vector

Represents a 3-dimensional vector.

SocketAddress

SocketAddress()
SocketAddress(hostname: str, port: int)
SocketAddress()

Represents an IP Socket Address (hostname + port number).

Attributes:

Name Type Description
hostname str

Gets the hostname.

port int

Gets the port number.

hostname property

hostname: str

Gets the hostname.

port property

port: int

Gets the port number.

Vector

Vector()
Vector(x: float, y: float, z: float)
Vector()

Represents a 3-dimensional vector.

Methods:

Name Description
distance

The distance between this Vector and another

distance_squared

The squared distance between this Vector and another

Attributes:

Name Type Description
length float

The magnitude of the Vector

length_squared float

The squared magnitude of the Vector

x float

The X component of the vector

y float

The Y component of the vector

z float

The Z component of the vector

length property

length: float

The magnitude of the Vector

length_squared property

length_squared: float

The squared magnitude of the Vector

x property writable

x: float

The X component of the vector

y property writable

y: float

The Y component of the vector

z property writable

z: float

The Z component of the vector

distance

distance(other: Vector) -> float

The distance between this Vector and another

distance_squared

distance_squared(other: Vector) -> float

The squared distance between this Vector and another