Manager responsible for fetching, caching, and updating Player structures.
Signature:
declare class PlayerManager#Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates an instance of PlayerManager. |
#Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
Collection<number, Player> |
Collection cache of online Players, keyed by their UserId. | ||
|
|
Player[] |
Gets a list of all players with a permission level other than 'Normal'. | |
|
|
Player[] |
Gets a list of all players with a wanted level greater than 0. |
#Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Clears the player cache and username mappings. | ||
|
Fetches all active players currently in the game server. Updates the player cache. | ||
|
Retrieves a player's UserId from their Roblox username, resolving from cache. | ||
|
Unadmins a player from their userId. | ||
|
Unbans a player from their userId. | ||
|
Unhelpers a player from their userId. | ||
|
Unmods a player from their userId. | ||
|
Re-synchronizes the cache with the raw player list from the API. Emits playerJoin, playerLeave, and playerUpdate events. |