berconpy.Player¶
- class berconpy.Player(cache, id, name, guid, addr, ping, is_guid_valid, in_lobby)¶
Bases:
objectRepresents a player in the server.
Methods
ban_guid([duration, reason])Bans the player from the server using their GUID.
ban_ip([duration, reason])Bans the player from the server using their IP.
Checks if the player is still in the client's cache.
kick([reason])Kicks the player from the server.
send(message)Sends a message to the 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.
- async ban_guid(duration=None, reason='')¶
Bans the player from the server using their GUID.
- async ban_ip(duration=None, reason='')¶
Bans the player from the server using their IP.
- async kick(reason='')¶
Kicks the player from the server.
- async send(message)¶
Sends a message to the player.
- property client: ArmaClient | 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.
-
in_lobby:
bool¶ Whether the player is in the server lobby or not.
This data is only accurate after calling the
ArmaClient.fetch_players()method since it cannot be determined during connection.
-
ping:
int|None¶ The player’s ping on the server.
This data may not be available or may be out-of-date since it is only provided when the
ArmaClient.fetch_players()is called.