berconpy.player.Player¶
- class berconpy.player.Player(cache, id, name, guid, addr, ping, is_guid_valid, in_lobby)¶
Bases:
ABCRepresents a player in the server.
Methods
ban_guid([duration, reason])Bans this player from the server using their GUID.
ban_ip([duration, reason])Bans this player from the server using their IP.
Checks if this player is still in the client's cache.
kick([reason])Kicks this player from the server.
send(message)Sends a message to this player.
Attributes
The ID assigned to this player by the server.
The player's name.
The player's GUID.
The IP address and port this player connected from.
The player's ping on the server.
Whether the server has confirmed the validity of this player's GUID.
Whether the player is in the server lobby or not.
The cache that created this object.
Returns the client associated with the cache.
Returns the IP address of the player.
- abstract ban_guid(duration=None, reason='')¶
Bans this player from the server using their GUID.
- abstract ban_ip(duration=None, reason='')¶
Bans this player from the server using their IP.
- abstract kick(reason='')¶
Kicks this player from the server.
- abstract send(message)¶
Sends a message to this player.
- property cache: RCONClientCache¶
The cache that created this object.
- property client: RCONClient | None¶
Returns the client associated with the cache.
-
guid:
str¶ The player’s GUID. This may be an empty string if the client has not yet received the GUID from the server.