From efe605b8a5dc18ba3b2bfd1c0e17fef6248b08d2 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Tue, 17 Nov 2020 21:00:41 +0200 Subject: [PATCH] Fixed Plan not enabling on proxies on 2nd enable --- .../plan/identification/storage/ServerFileLoader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/identification/storage/ServerFileLoader.java b/Plan/common/src/main/java/com/djrapitops/plan/identification/storage/ServerFileLoader.java index c668b4b30..c515675da 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/identification/storage/ServerFileLoader.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/identification/storage/ServerFileLoader.java @@ -19,6 +19,7 @@ package com.djrapitops.plan.identification.storage; import com.djrapitops.plan.exceptions.EnableException; import com.djrapitops.plan.identification.Server; import com.djrapitops.plan.settings.config.Config; +import com.djrapitops.plan.settings.config.ConfigNode; import com.djrapitops.plan.settings.config.ConfigReader; import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.settings.config.paths.PluginSettings; @@ -69,7 +70,9 @@ public class ServerFileLoader extends Config implements ServerLoader { Integer id = getInteger("Server.ID"); UUID serverUUID = UUID.fromString(serverUUIDString); - String name = config.get(PluginSettings.SERVER_NAME); + String name = config.getNode(PluginSettings.SERVER_NAME.getPath()) + .map(ConfigNode::getString) + .orElse("BungeeCord"); String address = getString("Server.Web_address"); return Optional.of(new Server(id, serverUUID, name, address));