Class: Player

Player

Represents a player.

new Player(client, data, isPartial)

Name Type Description
client RCONClient
data Object
isPartial boolean

Members

clanTagstring

clientRCONClient

eosIdstring

idstring

levelnumber

namestring

partialboolean

platformstring

platoonstring

rolenumber

scoreDataPlayerScoreData

teamnumber

worldPositionPlayerPosition

Methods

_patch(data)

Patches this player with new data.

Name Type Description
data Object

asyncaddAdmin(adminGroup, comment){Promise.<void>}

Add this user as an admin.

Name Type Description
adminGroup string
comment string optional
Returns:
Type Description
Promise.<void>

asyncaddVIP(comment){Promise.<void>}

Grants this player VIP status.

Name Type Description
comment string
Returns:
Type Description
Promise.<void>

asynckick(reason){Promise.<void>}

Kicks this player from the server.

Name Type Description
reason string optional
Returns:
Type Description
Promise.<void>

asyncmessage(message){Promise.<void>}

Sends this player a message.

Name Type Description
message string
Returns:
Type Description
Promise.<void>

asyncpermaBan(reason, adminName){Promise.<void>}

Permanently ban this player.

Name Type Description
reason string optional
adminName string optional
Returns:
Type Description
Promise.<void>

asyncpunish(reason){Promise.<void>}

Punishes this player.

Name Type Description
reason string optional
Returns:
Type Description
Promise.<void>

asyncremoveAdmin(){Promise.<void>}

Remove this user as an admin.

Returns:
Type Description
Promise.<void>

asyncremoveFromPlatoon(reason){Promise.<void>}

Removes this player from their platoon.

Name Type Description
reason string optional
Throws:
  • If the player is commander or not in a unit.
Type
Error
Returns:
Type Description
Promise.<void>

asyncremovePermaBan(){Promise.<void>}

Remove this player's permanent ban.

Returns:
Type Description
Promise.<void>

asyncremoveTempBan(){Promise.<void>}

Removes this player's temporary ban.

Returns:
Type Description
Promise.<void>

asyncremoveVIP(){Promise.<void>}

Removes this player's VIP status.

Returns:
Type Description
Promise.<void>

asyncswitchTeams(switchNow){Promise.<void>}

Switch this player's team.

Name Type Default Description
switchNow boolean true optional

Whether to switch this player's team immediately, as opposed to on death.

Returns:
Type Description
Promise.<void>

asynctempBan(duration, reason, adminName){Promise.<void>}

Temporarily bans this player.

Name Type Description
duration number

The number in hours for the temporary ban.

reason string optional
adminName string optional
Throws:
  • If duration isn't a positive integer.
Type
Error
Returns:
Type Description
Promise.<void>