Player

Player

Represents a player.

Constructor

new Player(client, data, isPartial)

Parameters:
Name Type Description
client RCONClient
data Object
isPartial boolean

Members

clanTag :string

Type:
  • string

client :RCONClient

Type:

eosId :string

Type:
  • string

id :string

Type:
  • string

level :number

Type:
  • number

name :string

Type:
  • string

partial :boolean

Type:
  • boolean

platform :string

Type:
  • string

platoon :string

Type:
  • string

role :number

Type:
  • number

scoreData :PlayerScoreData

Type:

stats :PlayerStats

Type:

team :number

Type:
  • number

worldPosition :PlayerPosition

Type:

Methods

_patch(data)

Patches this player with new data.
Parameters:
Name Type Description
data Object

(async) addAdmin(adminGroup, commentopt) → {Promise.<void>}

Add this user as an admin.
Parameters:
Name Type Attributes Description
adminGroup string
comment string <optional>
Returns:
Type:
Promise.<void>

(async) addVIP(comment) → {Promise.<void>}

Grants this player VIP status.
Parameters:
Name Type Description
comment string
Returns:
Type:
Promise.<void>

(async) kick(reasonopt) → {Promise.<void>}

Kicks this player from the server.
Parameters:
Name Type Attributes Description
reason string <optional>
Returns:
Type:
Promise.<void>

(async) message(message) → {Promise.<void>}

Sends this player a message.
Parameters:
Name Type Description
message string
Returns:
Type:
Promise.<void>

(async) permaBan(reasonopt, adminNameopt) → {Promise.<void>}

Permanently ban this player.
Parameters:
Name Type Attributes Description
reason string <optional>
adminName string <optional>
Returns:
Type:
Promise.<void>

(async) punish(reasonopt) → {Promise.<void>}

Punishes this player.
Parameters:
Name Type Attributes Description
reason string <optional>
Returns:
Type:
Promise.<void>

(async) removeAdmin() → {Promise.<void>}

Remove this user as an admin.
Returns:
Type:
Promise.<void>

(async) removeFromPlatoon(reasonopt) → {Promise.<void>}

Removes this player from their platoon.
Parameters:
Name Type Attributes Description
reason string <optional>
Throws:
- If the player is commander or not in a unit.
Type
Error
Returns:
Type:
Promise.<void>

(async) removePermaBan() → {Promise.<void>}

Remove this player's permanent ban.
Returns:
Type:
Promise.<void>

(async) removeTempBan() → {Promise.<void>}

Removes this player's temporary ban.
Returns:
Type:
Promise.<void>

(async) removeVIP() → {Promise.<void>}

Removes this player's VIP status.
Returns:
Type:
Promise.<void>

(async) switchTeams(switchNowopt) → {Promise.<void>}

Switch this player's team.
Parameters:
Name Type Attributes Default Description
switchNow boolean <optional>
true Whether to switch this player's team immediately, as opposed to on death.
Returns:
Type:
Promise.<void>

(async) tempBan(duration, reasonopt, adminNameopt) → {Promise.<void>}

Temporarily bans this player.
Parameters:
Name Type Attributes 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:
Promise.<void>