npm.io
1.5.4 • Published 2 years ago

@types/mcping-js

Licence
MIT
Version
1.5.4
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/mcping-js

Summary

This package contains type definitions for mcping-js (https://github.com/Cryptkeeper/mcping-js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mcping-js.

index.d.ts

// TypeScript Version: 3.8
export interface PingResponse {
    version: {
        name: string;
        protocol: number;
    };

    players: {
        max: number;
        online: number;
        sample?:
            | Array<{
                name: string;
                id: string;
            }>
            | undefined;
    };

    description: {
        text: string;
    };

    favicon: string;
}

export class MinecraftServer {
    constructor(host: string, port?: number);
    ping(
        timeout: number,
        protocolVersion: number | undefined,
        callback: (err?: Error, res?: PingResponse) => void,
    ): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Inrix.