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 |
allow_flight
property
writable
¶
allow_flight: bool
If the Player is allowed to fly via jump key double-tap.
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.
walk_speed
property
writable
¶
walk_speed: float
Gets or sets the current allowed speed that a client can walk.
give_exp_levels
¶
give_exp_levels(amount: int) -> None
Gives the player the amount of experience levels specified.
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
¶
send_form(
form: MessageForm | ActionForm | ModalForm,
) -> None
Sends a form to the player.
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.