Fixed NPE on PlayersPage if Export is enabled

This commit is contained in:
Rsl1122 2019-01-08 11:15:47 +02:00
parent ab99ed1976
commit f05108fe63

View File

@ -22,6 +22,7 @@ import com.djrapitops.plan.system.database.databases.Database;
import com.djrapitops.plan.system.file.PlanFiles;
import com.djrapitops.plan.system.info.server.ServerInfo;
import com.djrapitops.plan.system.settings.config.PlanConfig;
import com.djrapitops.plan.system.settings.paths.PluginSettings;
import com.djrapitops.plan.system.settings.paths.ProxySettings;
import com.djrapitops.plan.system.update.VersionCheckSystem;
import com.djrapitops.plan.utilities.formatting.PlaceholderReplacer;
@ -74,7 +75,7 @@ public class PlayersPage implements Page {
placeholderReplacer.put("version", versionCheckSystem.getCurrentVersion());
placeholderReplacer.put("update", versionCheckSystem.getUpdateHtml().orElse(""));
if (Check.isBukkitAvailable()) {
placeholderReplacer.put("networkName", serverInfo.getServer().getName());
placeholderReplacer.put("networkName", config.get(PluginSettings.SERVER_NAME));
} else {
placeholderReplacer.put("networkName", config.get(ProxySettings.NETWORK_NAME));
}