Skip to content

Server

endstone.Server

Represents a server implementation.

command_sender property

command_sender: CommandSender

Gets a CommandSender for this server.

levels property

levels: list[Level]

Gets a list of all levels on this server.

logger property

logger: Logger

Returns the primary logger associated with this server instance.

max_players property writable

max_players: int

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

minecraft_version property

minecraft_version: str

Gets the Minecraft version that this server is running.

name property

name: str

Gets the name of this server implementation.

online_players property

online_players: list[Player]

Gets a list of all currently online players.

plugin_manager property

plugin_manager: PluginManager

Gets the plugin manager for interfacing with plugins.

scheduler property

scheduler: Scheduler

Gets the scheduler for managing scheduled events.

version property

version: str

Gets the version of this server implementation.

broadcast

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

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

broadcast_message

broadcast_message(message: str) -> None

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

dispatch_command

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

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

get_level

get_level(name: str) -> Level

Gets the level with the given name.

get_player

get_player(name: str) -> Player

Gets the player with the exact given name, case insensitive.

get_player(unique_id: UUID) -> Player

Gets the player with the given UUID.

get_plugin_command

get_plugin_command(name: str) -> PluginCommand

Gets a PluginCommand with the given name or alias.