mc-server-status
Version:
Fetch the status of a Minecraft server.
23 lines (22 loc) • 539 B
TypeScript
export interface Status {
version: {
name: string;
protocol: number;
};
players: {
max: number;
online: number;
};
description: string;
favicon?: string;
ping?: number;
}
export interface StatusOptions {
/** @default true */
checkPing?: boolean;
/** @default 5000 // ms */
timeout?: number;
/** @default 736 // 1.16.1 */
protocol?: number;
}
export declare function getStatus(host: string, port?: number | null, options?: StatusOptions): Promise<Status>;