mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
fix(types): complete type definitions (#1053)
Complete the type definitions to prevent errors.
This commit is contained in:
parent
38eecb5aa1
commit
2fc4b917d9
1 changed files with 2 additions and 2 deletions
4
src/index.d.ts
vendored
4
src/index.d.ts
vendored
|
@ -37,7 +37,7 @@ declare module 'minecraft-protocol' {
|
||||||
writeChannel(channel: any, params: any): void
|
writeChannel(channel: any, params: any): void
|
||||||
signMessage(message: string, timestamp: BigInt, salt?: number): Buffer
|
signMessage(message: string, timestamp: BigInt, salt?: number): Buffer
|
||||||
verifyMessage(publicKey: Buffer | KeyObject, packet: object): boolean
|
verifyMessage(publicKey: Buffer | KeyObject, packet: object): boolean
|
||||||
reportPlayer(uuid: string, reason: 'FALSE_REPORTING' | 'HATE_SPEECH' | 'TERRORISM_OR_VIOLENT_EXTREMISM' | 'CHILD_SEXUAL_EXPLOITATION_OR_ABUSE' | 'IMMINENT_HARM' | 'NON_CONSENSUAL_INTIMATE_IMAGERY' | 'HARASSMENT_OR_BULLYING' | 'DEFAMATION_IMPERSONATION_FALSE_INFORMATION' | 'SELF_HARM_OR_SUICIDE' | 'ALCOHOL_TOBACCO_DRUGS', signatures: Buffer[], comment?: string)
|
reportPlayer(uuid: string, reason: 'FALSE_REPORTING' | 'HATE_SPEECH' | 'TERRORISM_OR_VIOLENT_EXTREMISM' | 'CHILD_SEXUAL_EXPLOITATION_OR_ABUSE' | 'IMMINENT_HARM' | 'NON_CONSENSUAL_INTIMATE_IMAGERY' | 'HARASSMENT_OR_BULLYING' | 'DEFAMATION_IMPERSONATION_FALSE_INFORMATION' | 'SELF_HARM_OR_SUICIDE' | 'ALCOHOL_TOBACCO_DRUGS', signatures: Buffer[], comment?: string): Promise<true>
|
||||||
on(event: 'error', listener: (error: Error) => PromiseLike): this
|
on(event: 'error', listener: (error: Error) => PromiseLike): this
|
||||||
on(event: 'packet', handler: (data: any, packetMeta: PacketMeta, buffer: Buffer, fullBuffer: Buffer) => PromiseLike): this
|
on(event: 'packet', handler: (data: any, packetMeta: PacketMeta, buffer: Buffer, fullBuffer: Buffer) => PromiseLike): this
|
||||||
on(event: 'raw', handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
on(event: 'raw', handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
||||||
|
@ -47,7 +47,7 @@ declare module 'minecraft-protocol' {
|
||||||
on(event: 'connect', handler: () => PromiseLike): this
|
on(event: 'connect', handler: () => PromiseLike): this
|
||||||
on(event: string, handler: (data: any, packetMeta: PacketMeta) => PromiseLike): this
|
on(event: string, handler: (data: any, packetMeta: PacketMeta) => PromiseLike): this
|
||||||
on(event: `raw.${string}`, handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
on(event: `raw.${string}`, handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
||||||
on(event: 'playerChat', handler: ({ formattedMessage, message, type, sender, senderName, senderTeam, verified }))
|
on(event: 'playerChat', handler: ({ formattedMessage: string, message: string, type: string, sender: string, senderName: string, senderTeam: string, verified?: boolean })): this
|
||||||
once(event: 'error', listener: (error: Error) => PromiseLike): this
|
once(event: 'error', listener: (error: Error) => PromiseLike): this
|
||||||
once(event: 'packet', handler: (data: any, packetMeta: PacketMeta, buffer: Buffer, fullBuffer: Buffer) => PromiseLike): this
|
once(event: 'packet', handler: (data: any, packetMeta: PacketMeta, buffer: Buffer, fullBuffer: Buffer) => PromiseLike): this
|
||||||
once(event: 'raw', handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
once(event: 'raw', handler: (buffer: Buffer, packetMeta: PacketMeta) => PromiseLike): this
|
||||||
|
|
Loading…
Reference in a new issue