From 579aa640947fa02122305441ca1683d71fe25ad5 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 21 Apr 2024 23:29:25 +0100 Subject: [PATCH] add location to the server --- .../models/server/MinecraftServer.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/xyz/mcutils/models/server/MinecraftServer.java b/src/main/java/xyz/mcutils/models/server/MinecraftServer.java index b6d8ac6..97fcc43 100644 --- a/src/main/java/xyz/mcutils/models/server/MinecraftServer.java +++ b/src/main/java/xyz/mcutils/models/server/MinecraftServer.java @@ -39,6 +39,11 @@ public class MinecraftServer { */ private Players players; + /** + * The location of the server. + */ + private GeoLocation location; + @AllArgsConstructor @Getter private static class MOTD { @@ -94,4 +99,35 @@ public class MinecraftServer { private String name; } } + + /** + * The location of the server. + */ + @AllArgsConstructor @Getter + public static class GeoLocation { + /** + * The country of the server. + */ + private final String country; + + /** + * The region of the server. + */ + private final String region; + + /** + * The city of the server. + */ + private final String city; + + /** + * The latitude of the server. + */ + private final double latitude; + + /** + * The longitude of the server. + */ + private final double longitude; + } }