class PlayerUtils { static getPlayers ( ) { const players = [ ] ; const playersNum = GetNumPlayerIndices ( ) ; for ( let i = 0 ; i < playersNum ; i ++ ) { players . push ( GetPlayerFromIndex ( i ) ) ; } return players ; } static getPlayerIdentifiers ( player ) { const identifiers = [ ] ; const identifiersNum = GetNumPlayerIdentifiers ( player ) ; for ( let i = 0 ; i < identifiersNum ; i ++ ) { identifiers . push ( GetPlayerIdentifier ( player , i ) ) ; } return identifiers ; } static getPlayerByIdentifier ( identifier ) { for ( const player of PlayerUtils . getPlayers ( ) ) { const identifiers = PlayerUtils . getPlayerIdentifiers ( player ) ; if ( identifiers . includes ( identifier ) ) { return player ; } } return undefined ; } } export default PlayerUtils ;