From 2ad5556041744822e5ef13b9c91674a065b176fa Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 21 Apr 2024 23:30:58 +0100 Subject: [PATCH] add check if licence is in the config for maxmind --- src/main/java/xyz/mcutils/backend/service/MaxMindService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/xyz/mcutils/backend/service/MaxMindService.java b/src/main/java/xyz/mcutils/backend/service/MaxMindService.java index bdd13ca..3f2392a 100644 --- a/src/main/java/xyz/mcutils/backend/service/MaxMindService.java +++ b/src/main/java/xyz/mcutils/backend/service/MaxMindService.java @@ -39,6 +39,10 @@ public class MaxMindService { public MaxMindService(@Value("${maxmind.license}") String maxMindLicense) { this.maxMindLicense = maxMindLicense; + if (maxMindLicense.isBlank()) { + log.error("The MaxMind license key is not set, please set it in the configuration and try again"); + System.exit(1); + } File databaseFile = loadDatabase(); try {