From 547fa075f3e546cf5f9902043d6b7da0ddd22f86 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 17:10:23 +0100 Subject: [PATCH] fix hostname stored --- src/main/java/xyz/mcutils/backend/service/ServerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/mcutils/backend/service/ServerService.java b/src/main/java/xyz/mcutils/backend/service/ServerService.java index 5e57409..968053c 100644 --- a/src/main/java/xyz/mcutils/backend/service/ServerService.java +++ b/src/main/java/xyz/mcutils/backend/service/ServerService.java @@ -100,7 +100,8 @@ public class ServerService { ((JavaMinecraftServer) server.getServer()).setMojangBlocked(mojangService.isServerBlocked(hostname)); } - ((UniqueServerLookupsMetric) metricService.getMetric(UniqueServerLookupsMetric.class)).addLookup(key); // Add the server lookup to the unique server lookups + ((UniqueServerLookupsMetric) metricService.getMetric(UniqueServerLookupsMetric.class)) + .addLookup("%s-%s:%s".formatted(platformName, hostname, port)); // Add the server lookup to the unique server lookups log.info("Found server: {}:{}", hostname, port); serverCacheRepository.save(server);