Fixed enable issues caused by ServerInfo not being enabled

This commit is contained in:
Rsl1122 2019-04-23 19:15:18 +03:00
parent b642432b1c
commit 775baf5a00
3 changed files with 7 additions and 10 deletions

View File

@ -126,11 +126,11 @@ public class PlanSystem implements SubSystem {
localeSystem, localeSystem,
versionCheckSystem, versionCheckSystem,
databaseSystem, databaseSystem,
importSystem,
exportSystem,
webServerSystem,
processing, processing,
serverInfo, serverInfo,
webServerSystem,
importSystem,
exportSystem,
infoSystem, infoSystem,
cacheSystem, cacheSystem,
listenerSystem, listenerSystem,

View File

@ -92,7 +92,7 @@ public class HtmlExport extends SpecificExport {
} }
public void exportServer(UUID serverUUID) { public void exportServer(UUID serverUUID) {
if (!usingProxy && connectionSystem.isServerAvailable()) { if (serverInfo.getServer().isNotProxy() && connectionSystem.isServerAvailable()) {
return; return;
} }
dbSystem.getDatabase().query(ServerQueries.fetchServerMatchingIdentifier(serverUUID)) dbSystem.getDatabase().query(ServerQueries.fetchServerMatchingIdentifier(serverUUID))
@ -121,7 +121,7 @@ public class HtmlExport extends SpecificExport {
} }
public void exportCachedPlayerPage(UUID playerUUID) { public void exportCachedPlayerPage(UUID playerUUID) {
if (!usingProxy && connectionSystem.isServerAvailable()) { if (serverInfo.getServer().isNotProxy() && connectionSystem.isServerAvailable()) {
return; return;
} }

View File

@ -40,9 +40,7 @@ import java.util.UUID;
public abstract class SpecificExport { public abstract class SpecificExport {
private final PlanFiles files; private final PlanFiles files;
private final ServerInfo serverInfo; protected final ServerInfo serverInfo;
protected final boolean usingProxy;
protected SpecificExport( protected SpecificExport(
PlanFiles files, PlanFiles files,
@ -50,7 +48,6 @@ public abstract class SpecificExport {
) { ) {
this.files = files; this.files = files;
this.serverInfo = serverInfo; this.serverInfo = serverInfo;
usingProxy = serverInfo.getServer().isProxy();
} }
protected File getFolder() { protected File getFolder() {
@ -123,7 +120,7 @@ public abstract class SpecificExport {
.replace("src=\"js/", "src=\"../js/"); .replace("src=\"js/", "src=\"../js/");
File htmlLocation; File htmlLocation;
if (usingProxy) { if (serverInfo.getServer().isProxy()) {
if (serverUUID.equals(serverInfo.getServerUUID())) { if (serverUUID.equals(serverInfo.getServerUUID())) {
htmlLocation = new File(getFolder(), "network"); htmlLocation = new File(getFolder(), "network");
} else { } else {