mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
chore(resources): General Linting
This commit is contained in:
1 parent
457926263d
commit
f1012958e2
15 files changed
+25
-34
No files matched your search
@@ -1,9 +1,8 @@
|
||||
import { getSource } from '../utils/miscUtils';
|
||||
import PlayerService from './player.service';
|
||||
import { config, ESX } from '../server';
|
||||
import { config } from '../server';
|
||||
import { PlayerAddData } from './player.interfaces';
|
||||
import { playerLogger } from './player.utils';
|
||||
import { XPlayer } from 'esx.js/@types/server';
|
||||
|
||||
/**
|
||||
* Essentially this whole file acts as a controller layer
|
||||
@@ -28,7 +27,7 @@ on('playerDropped', () => {
|
||||
try {
|
||||
PlayerService.handleUnloadPlayerEvent(src, true);
|
||||
} catch (e) {
|
||||
playerLogger.debug(`${src} failed to unload, likely was never loaded in the first place.`)
|
||||
playerLogger.debug(`${src} failed to unload, likely was never loaded in the first place.`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -188,7 +188,8 @@ class _PlayerService {
|
||||
* @param fetch Whether or not to query the database if a given player is offline
|
||||
**/
|
||||
async getIdentifierByPhoneNumber(phoneNumber: string, fetch?: boolean): Promise<string | null> {
|
||||
for (const [source, player] of this.playersBySource) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
for (const [_, player] of this.playersBySource) {
|
||||
if (player.getPhoneNumber() === phoneNumber) return player.getIdentifier();
|
||||
}
|
||||
// Whether we fetch from database if not found in online players
|
||||
@@ -200,9 +201,8 @@ class _PlayerService {
|
||||
/**
|
||||
* Unload event handler
|
||||
* @param src - Source of player being unloaded
|
||||
* @param playerDropped - Whether the player disconnected or is being unloaded for multichar
|
||||
**/
|
||||
handleUnloadPlayerEvent(src: number, playerDropped?: boolean) {
|
||||
handleUnloadPlayerEvent(src: number) {
|
||||
this.deletePlayerFromMaps(src);
|
||||
|
||||
playerLogger.info(`Unloaded NPWD Player, source: (${src})`);
|
||||
|
||||
Reference in new issue
Block a user