Skip to content

Player

endstone.Player

Bases: Mob

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.

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_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.

spawn_particle
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).

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.

locale str

Get the player's current locale.

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

address property

address: SocketAddress

Gets the socket address of this player

allow_flight property writable

allow_flight: bool

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

device_id property

device_id: str

Get the player's current device id.

device_os property

device_os: str

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

exp_level property writable

exp_level: int

Gets or sets the players current experience level.

exp_progress property writable

exp_progress: float

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

fly_speed property writable

fly_speed: float

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

game_mode property writable

game_mode: GameMode

The player's current game mode.

game_version property

game_version: str

Get the player's current game version.

inventory property

inventory: PlayerInventory

Get the player's inventory.

is_flying property writable

is_flying: bool

If the player is currently flying or not.

locale property

locale: str

Get the player's current locale.

ping property

ping: int

Gets the player's average ping in milliseconds.

scoreboard property writable

scoreboard: Scoreboard

Gets or sets the player's visible Scoreboard.

skin property

skin: Skin

Get the player's skin.

total_exp property

total_exp: int

Gets the players total experience points.

unique_id property

unique_id: UUID

Returns the UUID of this player

walk_speed property writable

walk_speed: float

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

xuid property

xuid: str

Returns the Xbox User ID (XUID) of this player

close_form

close_form() -> None

Closes the forms that are currently open for the player.

give_exp

give_exp(amount: int) -> None

Gives the player the amount of experience specified.

give_exp_levels

give_exp_levels(amount: int) -> None

Gives the player the amount of experience levels specified.

kick

kick(message: str) -> None

Kicks player with custom kick message.

perform_command

perform_command(command: str) -> bool

Makes the player perform the given command.

reset_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.

send_form

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

Sends a form to the player.

send_packet

send_packet(packet: Packet) -> None

Sends a packet to the player.

send_popup

send_popup(message: str) -> None

Sends this player a popup message

send_tip

send_tip(message: str) -> None

Sends this player a tip message

send_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.

send_toast

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

Sends this player a toast notification.

spawn_particle

spawn_particle(
    name: str,
    location: Location,
    molang_variables_json: str | None = None,
) -> None

Spawns the particle at the target location.

spawn_particle(
    name: str,
    x: float,
    y: float,
    z: float,
    molang_variables_json: str | None = None,
) -> None

Spawns the particle at the target location.

transfer

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

Transfers the player to another server.

update_commands

update_commands() -> None

Send the list of commands to the client.