import { ServerStatus } from "../enums/ServerStatus" ; import { ServerTypes } from "../enums/ServerTypes" ; import { ServerAges } from "../enums/ServerAges" ; export default class L2Server { private _id ! : number ; private _ip ! : number ; private _port ! : number ; private _ageLimit ! : ServerAges ; private _pvp ! : number ; private _currentPlayers ! : number ; private _maxPlayers ! : number ; private _status ! : ServerStatus ; private _serverType ! : ServerTypes ; private _brackets ! : number ; return { number } public get Id ( ) : number { return this . _id ; } param { number } value public set Id ( value ) { this . _id = value ; } return { number } public get Ip ( ) : number { return this . _ip ; } param { number } value public set Ip ( value ) { this . _ip = value ; } return { number } public get Port ( ) : number { return this . _port ; } param { number } value public set Port ( value ) { this . _port = value ; } return { ServerAges } public get AgeLimit ( ) : ServerAges { return this . _ageLimit ; } param { ServerAges } value public set AgeLimit ( value ) { this . _ageLimit = value ; } return { number } public get Pvp ( ) : number { return this . _pvp ; } param { number } value public set Pvp ( value ) { this . _pvp = value ; } return { number } public get CurrentPlayers ( ) : number { return this . _currentPlayers ; } param { number } value public set CurrentPlayers ( value ) { this . _currentPlayers = value ; } return { number } public get MaxPlayers ( ) : number { return this . _maxPlayers ; } param { number } value public set MaxPlayers ( value ) { this . _maxPlayers = value ; } return { ServerStatus } public get Status ( ) : ServerStatus { return this . _status ; } param { ServerStatus } value public set Status ( value ) { this . _status = value ; } return { ServerTypes } public get ServerType ( ) : ServerTypes { return this . _serverType ; } param { ServerTypes } value public set ServerType ( value ) { this . _serverType = value ; } return { number } public get Brackets ( ) : number { return this . _brackets ; } param { number } value public set Brackets ( value ) { this . _brackets = value ; } public Ipv4 ( ) { const p1 = this . _ip & 255 ; const p2 = ( this . _ip >> 8 ) & 255 ; const p3 = ( this . _ip >> 16 ) & 255 ; const p4 = ( this . _ip >> 24 ) & 255 ; return `${ p1 }.${ p2 }.${ p3 }.${ p4 }` ; } }