Add setting for proxy online mode status

TODO: Add isProxyOnlineMode check to Metrics
This commit is contained in:
Gabriele C
2016-08-05 01:03:08 +02:00
parent a55727ff06
commit f7ae11f984
4 changed files with 53 additions and 27 deletions

View File

@@ -233,19 +233,20 @@
Thread thread1 = new Thread(new ServerWatchdog(this));
thread1.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandlerWithName(DedicatedServer.LOGGER));
@@ -215,6 +318,12 @@
}
}
@@ -213,7 +316,13 @@
return true;
}
+ }
+
+ // Paper start
+ public java.io.File getPluginsFolder() {
+ return (java.io.File) this.options.valueOf("plugins");
+ }
}
+ // Paper end
+
@Override
public boolean isSpawningMonsters() {
return this.settings.getProperties().spawnMonsters && super.isSpawningMonsters();
@@ -293,6 +402,7 @@
this.queryThreadGs4.stop();
}
@@ -291,7 +292,20 @@
return false;
} else if (this.getPlayerList().getOps().isEmpty()) {
return false;
@@ -541,16 +659,52 @@
@@ -453,7 +571,11 @@
public boolean enforceSecureProfile() {
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
- return dedicatedserverproperties.enforceSecureProfile && dedicatedserverproperties.onlineMode && this.services.canValidateProfileKeys();
+ // Paper start - Add setting for proxy online mode status
+ return dedicatedserverproperties.enforceSecureProfile
+ && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
+ && this.services.canValidateProfileKeys();
+ // Paper end - Add setting for proxy online mode status
}
@Override
@@ -541,16 +663,52 @@
@Override
public String getPluginNames() {
@@ -348,7 +362,7 @@
}
public void storeUsingWhiteList(boolean useWhitelist) {
@@ -660,4 +814,15 @@
@@ -660,4 +818,15 @@
}
}
}