Skip to main content

Module player

Module player 

Source
Expand description

This module contains all things player-related.

Re-exportsΒ§

pub use chat::LastSeen;
pub use chat::LastSeenMessagesValidator;
pub use chat::MessageCache;
pub use connection::ClientInformation;
pub use connection::PlayerConnection;
pub use movement::PlayerInput;

ModulesΒ§

abilities πŸ”’
Player abilities (flight, invulnerability, etc.)
chat
Chat and messaging state for a player.
chunk_sender
This module is responsible for sending chunks to the client.
connection
This module contains the PlayerConnection trait that abstracts network connections. This module contains the PlayerConnection trait that abstracts network connections.
container_counter πŸ”’
entity_state πŸ”’
Core entity state flags for a player.
experience
Experience System
food_data
Player food/hunger system.
game_mode
Game mode specific logic for player interactions. Game mode specific logic for player interactions.
health_sync πŸ”’
Delta-tracking state for CSetHealth packet deduplication.
item_cooldowns πŸ”’
lifecycle πŸ”’
movement
Player movement physics and validation.
permissions πŸ”’
player_data
Persistent player data structures.
player_data_storage
Player data storage for global and domain-scoped player state.
player_inventory
Player inventory management.
profile πŸ”’
This module contains the GameProfile struct, which is used to store information about a player’s profile.
session πŸ”’
sleep πŸ”’
sleep_state πŸ”’
spam_throttler πŸ”’
stats_counter
This module provides the StatsCounter, which keeps track of stats with their counters, and implements some stat-related functions for the player.
tick_state πŸ”’
title πŸ”’
Player helpers for sending client-side title displays.

StructsΒ§

Abilities
Player abilities that control flight, invulnerability, and other special states. This mirrors vanilla’s Abilities class.
DomainResidenceToken πŸ”’
Runtime identity for one continuous stay in a Steel domain.
GameProfile
A struct representing a player’s game profile.
KnownPlayer
One cached player identity.
KnownPlayers
In-memory player identity cache.
PendingRootVehicleRestore πŸ”’
Player
A struct representing a player.
PlayerResidenceState πŸ”’
PlayerRespawnConfig
Vanilla per-player respawn configuration.
PlayerSession
Connection-owned state that survives replacement of the active player entity.

EnumsΒ§

GameProfileAction
An enum representing a profile action.
ProfileLookupError
Failure while resolving a player identity through the configured profile service.

ConstantsΒ§

DEFAULT_FLYING_SPEED
Default flying speed in vanilla Minecraft
DROP_SPAM_THROTTLER_INCREMENT_STEP πŸ”’
DROP_SPAM_THROTTLER_THRESHOLD πŸ”’
HAT_MODEL_PART_MASK πŸ”’
RESPAWN_SEARCH_READY_CANDIDATE_BUDGET πŸ”’

FunctionsΒ§

is_valid_player_name
Returns whether a name is valid for online login and profile lookup.
offline_uuid
Generates vanilla’s deterministic offline-mode UUID for a player name.
protocol_look_at_anchor πŸ”’