refactor!: changes in bedrock protocol code

BREAKING CHANGE: new bedrock ping response format
This commit is contained in:
2024-03-31 01:56:03 +03:00
parent 9d25aaf4ea
commit 296294ca96
2 changed files with 47 additions and 95 deletions

View File

@ -3,22 +3,24 @@
* @param timeout The read/write socket timeout.
*/
export type BedrockPingOptions = {
port?: number | undefined,
timeout?: number | undefined;
port?: number;
timeout?: number;
};
export type BedrockPingResponse = {
edition: string;
name: string;
version: {
gameVersion: string;
protocol: string;
protocolVersion: number;
minecraftVersion: string;
};
players: {
max: string;
online: string;
online: number;
max: number;
};
description: string;
gamemode: string;
serverId: string;
mapName: string;
gameMode: string;
};
/**