mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
add missing types (#891)
* Export id on a new interface for servers * add compressionThreshold
This commit is contained in:
parent
4dc08372c8
commit
31bd5d295e
1 changed files with 7 additions and 2 deletions
9
src/index.d.ts
vendored
9
src/index.d.ts
vendored
|
@ -19,6 +19,7 @@ declare module 'minecraft-protocol' {
|
|||
uuid: string
|
||||
protocolVersion: number
|
||||
version: string
|
||||
compressionThreshold: string
|
||||
connect(port: number, host: string): void
|
||||
setSocket(socket: Socket): void
|
||||
end(reason: string): void
|
||||
|
@ -68,12 +69,16 @@ declare module 'minecraft-protocol' {
|
|||
playerCount: number
|
||||
writeToClients(clients: Client[], name: string, params: any): void
|
||||
close(): void
|
||||
on(event: 'connection', handler: (client: Client) => void): this
|
||||
on(event: 'connection', handler: (client: ServerClient) => void): this
|
||||
on(event: 'error', listener: (error: Error) => void): this
|
||||
on(event: 'login', handler: (client: Client) => void): this
|
||||
on(event: 'login', handler: (client: ServerClient) => void): this
|
||||
on(event: 'listening', listener: () => void): this
|
||||
}
|
||||
|
||||
export interface ServerClient extends Client {
|
||||
id: number
|
||||
}
|
||||
|
||||
export interface ServerOptions {
|
||||
'online-mode'?: boolean
|
||||
checkTimeoutInterval?: number
|
||||
|
|
Loading…
Reference in a new issue