Fixed Plan not enabling on proxies on 2nd enable

This commit is contained in:
Risto Lahtela 2020-11-17 21:00:41 +02:00
parent a078609dc1
commit efe605b8a5

View File

@ -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));