spockbot.plugins.helpers.clientinfo module¶
ClientInfo is a central plugin for recording data about the client, e.g. Health, position, and some auxillary information like the player list. Plugins subscribing to ClientInfo’s events don’t have to independently track this information on their own.
-
class
spockbot.plugins.helpers.clientinfo.
Abilities
¶ Bases:
spockbot.mcdata.utils.Info
-
class
spockbot.plugins.helpers.clientinfo.
ClientInfo
¶ Bases:
object
-
eid
¶ int
Entity ID of the player
-
name
¶ str
Player’s Username
-
uuid
¶ str
Player’s UUID
-
abilities
¶ Abilities
Player’s current movement state and speed
-
game_info
¶ GameInfo
Information about the current world/server
-
spawn_position
¶ Position
Players initial position
-
health
¶ PlayerHealth
Player’s health, food and saturation
-
position
¶ PlayerPosition
Player’s current position
-
player_list
¶ dict
List of all players in the server
-
eye_pos
¶ PlayerPosition
Player’s eye position
-
eye_pos
-
reset
()¶ Resets the information in ClientInfo
-
-
class
spockbot.plugins.helpers.clientinfo.
ClientInfoPlugin
(ploader, settings)¶ Bases:
spockbot.plugins.base.PluginBase
-
events
= {'PLAY<Change Game State': 'handle_game_state', 'PLAY<Join Game': 'handle_join_game', 'PLAY<Player Abilities': 'handle_player_abilities', 'net_disconnect': 'handle_disconnect', 'PLAY<Update Health': 'handle_update_health', 'PLAY<Server Difficulty': 'handle_server_difficulty', 'LOGIN<Login Success': 'handle_login_success', 'PLAY<Player Position and Look': 'handle_position_update', 'PLAY<Player List Item': 'handle_player_list', 'PLAY<Spawn Position': 'handle_spawn_position', 'PLAY<Attach Entity': 'handle_attach_entity'}¶
-
handle_attach_entity
(name, packet)¶
-
handle_disconnect
(name, data)¶
-
handle_game_state
(name, packet)¶
-
handle_join_game
(name, packet)¶
-
handle_login_success
(name, packet)¶
-
handle_player_abilities
(name, packet)¶
-
handle_player_list
(name, packet)¶
-
handle_position_update
(name, packet)¶
-
handle_server_difficulty
(name, packet)¶
-
handle_spawn_position
(name, packet)¶
-
handle_update_health
(name, packet)¶
-
pl_announce
= ('ClientInfo',)¶
-
requires
= 'Event'¶
-
-
class
spockbot.plugins.helpers.clientinfo.
GameInfo
¶ Bases:
spockbot.mcdata.utils.Info
-
class
spockbot.plugins.helpers.clientinfo.
PlayerHealth
¶ Bases:
spockbot.mcdata.utils.Info
-
class
spockbot.plugins.helpers.clientinfo.
PlayerListItem
¶ Bases:
spockbot.mcdata.utils.Info
-
class
spockbot.plugins.helpers.clientinfo.
PlayerPosition
(*xyz)¶
-
class
spockbot.plugins.helpers.clientinfo.
Position
(*xyz)¶ Bases:
spockbot.vector.Vector3
,spockbot.mcdata.utils.Info
Used for things that require encoding position for the protocol, but also require higher level vector functions.
-
get_dict
()¶
-