add server location

This commit is contained in:
Lee 2024-04-21 23:40:38 +01:00
parent 2f17c4d218
commit 68c9ac8a05
2 changed files with 33 additions and 1 deletions

@ -1,6 +1,6 @@
{
"name": "mcutils-library",
"version": "1.3.0",
"version": "1.3.1",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",

@ -28,6 +28,11 @@ export type MinecraftServer = {
* The players on the server.
*/
players: Players;
/**
* The location of the server, or undefined if the location is unknown.
*/
location?: GeoLocation;
};
type Motd = {
@ -75,3 +80,30 @@ type PlayerSample = {
*/
name: string;
};
type GeoLocation = {
/**
* The country of the location.
*/
country: string;
/**
* The region of the location.
*/
region: string;
/**
* The city of the location.
*/
city: string;
/**
* The latitude of the location.
*/
latitude: number;
/**
* The longitude of the location.
*/
longitude: number;
}