diff --git a/Plan/dependency-reduced-pom.xml b/Plan/dependency-reduced-pom.xml
index 8766ebbe7..9020926ee 100644
--- a/Plan/dependency-reduced-pom.xml
+++ b/Plan/dependency-reduced-pom.xml
@@ -65,6 +65,7 @@
org.mockito:*
org.easymock:*
junit:*
+ org.slf4j:*
@@ -87,10 +88,6 @@
com.zaxxer
plan.com.zaxxer
-
- org.slf4j
- plan.org.slf4j
-
org.bstats
com.djrapitops.plan.utilities.metrics
diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageConDebugCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageConDebugCommand.java
index 540e015a3..e4d420ad3 100644
--- a/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageConDebugCommand.java
+++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/manage/ManageConDebugCommand.java
@@ -65,7 +65,7 @@ public class ManageConDebugCommand extends CommandNode {
this.webServer = webServer;
this.dbSystem = dbSystem;
- setShortHelp(locale.getString(Check.isBungeeAvailable() ? CmdHelpLang.CON : CmdHelpLang.MANAGE_CON));
+ setShortHelp(locale.getString(Check.isBungeeAvailable() || Check.isVelocityAvailable() ? CmdHelpLang.CON : CmdHelpLang.MANAGE_CON));
setInDepthHelp(locale.getArray(DeepHelpLang.MANAGE_CON));
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/data/store/containers/NetworkContainer.java b/Plan/src/main/java/com/djrapitops/plan/data/store/containers/NetworkContainer.java
index 9e5d37828..4761310d8 100644
--- a/Plan/src/main/java/com/djrapitops/plan/data/store/containers/NetworkContainer.java
+++ b/Plan/src/main/java/com/djrapitops/plan/data/store/containers/NetworkContainer.java
@@ -121,7 +121,7 @@ public class NetworkContainer extends DataContainer {
putSupplier(NetworkKeys.TIME_ZONE, config::getTimeZoneOffsetHours);
putCachingSupplier(NetworkKeys.NETWORK_NAME, () ->
- Check.isBungeeAvailable() ?
+ Check.isBungeeAvailable() || Check.isVelocityAvailable() ?
config.getString(Settings.BUNGEE_NETWORK_NAME) :
bungeeContainer.getValue(ServerKeys.NAME).orElse("Plan")
);
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/InfoSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/info/InfoSystem.java
index 9ef47c2eb..f11f96b78 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/info/InfoSystem.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/info/InfoSystem.java
@@ -150,6 +150,9 @@ public abstract class InfoSystem implements SubSystem {
if (Check.isBungeeAvailable()) {
throw new BadRequestException("Method not available on Bungee.");
}
+ if (Check.isVelocityAvailable()) {
+ throw new BadRequestException("Method not available on Velocity.");
+ }
Server bungee = new Server(-1, null, "Bungee", addressToRequestServer, -1);
String addressOfThisServer = webServer.get().getAccessAddress();
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CheckConnectionRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CheckConnectionRequest.java
index 4568f085d..1efdc63a7 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CheckConnectionRequest.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CheckConnectionRequest.java
@@ -48,7 +48,7 @@ public class CheckConnectionRequest extends InfoRequestWithVariables {
public Response handleRequest(Map variables) throws WebException {
// Available variables: sender, address
- if (Check.isBungeeAvailable()) {
+ if (Check.isBungeeAvailable() || Check.isVelocityAvailable()) {
attemptConnection(variables);
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/SaveDBSettingsRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/SaveDBSettingsRequest.java
index 6e4ea082a..d02b5428c 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/SaveDBSettingsRequest.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/SaveDBSettingsRequest.java
@@ -65,6 +65,9 @@ public class SaveDBSettingsRequest extends InfoRequestWithVariables implements S
if (Check.isBungeeAvailable()) {
return new BadRequestResponse("Not supposed to be called on a Bungee server");
}
+ if (Check.isVelocityAvailable()) {
+ return new BadRequestResponse("Not supposed to be called on a Velocity server");
+ }
if (config.isFalse(Settings.BUNGEE_COPY_CONFIG) || config.isTrue(Settings.BUNGEE_OVERRIDE_STANDALONE_MODE)) {
return new BadRequestResponse("Bungee config settings overridden on this server.");
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/settings/network/NetworkSettings.java b/Plan/src/main/java/com/djrapitops/plan/system/settings/network/NetworkSettings.java
index 7e794f721..eeb52c3bf 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/settings/network/NetworkSettings.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/settings/network/NetworkSettings.java
@@ -67,7 +67,7 @@ public class NetworkSettings {
}
public void loadSettingsFromDB() {
- if (Check.isBungeeAvailable()) {
+ if (Check.isBungeeAvailable() || Check.isVelocityAvailable()) {
return;
}
@@ -81,7 +81,7 @@ public class NetworkSettings {
}
public void placeSettingsToDB() {
- if (!Check.isBungeeAvailable()) {
+ if (!Check.isBungeeAvailable() && !Check.isVelocityAvailable()) {
return;
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/WebServer.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/WebServer.java
index 6024428b0..0e06392fe 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/WebServer.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/WebServer.java
@@ -82,7 +82,7 @@ public class WebServer implements SubSystem {
initServer();
if (!isEnabled()) {
- if (Check.isBungeeAvailable()) {
+ if (Check.isBungeeAvailable() || Check.isVelocityAvailable()) {
throw new EnableException(locale.getString(PluginLang.ENABLE_FAIL_NO_WEB_SERVER_BUNGEE));
}
if (config.isTrue(Settings.WEBSERVER_DISABLED)) {
@@ -99,7 +99,7 @@ public class WebServer implements SubSystem {
* Starts up the WebServer in a new Thread Pool.
*/
private void initServer() {
- if (!Check.isBungeeAvailable() && config.isTrue(Settings.WEBSERVER_DISABLED)) {
+ if (!(Check.isBungeeAvailable() || Check.isVelocityAvailable()) && config.isTrue(Settings.WEBSERVER_DISABLED)) {
// Bukkit WebServer has been disabled.
return;
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/ServerPageHandler.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/ServerPageHandler.java
index 15955fdf5..1fcf33f02 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/ServerPageHandler.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/pages/ServerPageHandler.java
@@ -69,7 +69,7 @@ public class ServerPageHandler implements PageHandler {
if (response != null) {
return response;
} else {
- if (Check.isBungeeAvailable() && serverInfo.getServerUUID().equals(serverUUID)) {
+ if ((Check.isBungeeAvailable() || Check.isVelocityAvailable()) && serverInfo.getServerUUID().equals(serverUUID)) {
return ResponseCache.loadResponse(PageId.SERVER.of(serverUUID), responseFactory::networkPageResponse);
}
return refreshNow(serverUUID);
diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/file/export/SpecificExport.java b/Plan/src/main/java/com/djrapitops/plan/utilities/file/export/SpecificExport.java
index 7d4fb6f1c..32f3b8a58 100644
--- a/Plan/src/main/java/com/djrapitops/plan/utilities/file/export/SpecificExport.java
+++ b/Plan/src/main/java/com/djrapitops/plan/utilities/file/export/SpecificExport.java
@@ -34,7 +34,7 @@ public abstract class SpecificExport implements Runnable {
private final ServerInfo serverInfo;
protected final File outputFolder;
- private final boolean usingBungee;
+ private final boolean usingProxy;
protected SpecificExport(
PlanFiles files,
@@ -45,7 +45,7 @@ public abstract class SpecificExport implements Runnable {
this.config = config;
this.serverInfo = serverInfo;
outputFolder = getFolder();
- usingBungee = Check.isBungeeAvailable();
+ usingProxy = Check.isBungeeAvailable() || Check.isVelocityAvailable();
}
protected File getFolder() {
@@ -112,7 +112,7 @@ public abstract class SpecificExport implements Runnable {
.replace("src=\"js/", "src=\"../js/");
File htmlLocation;
- if (usingBungee) {
+ if (usingProxy) {
if (serverUUID.equals(serverInfo.getServerUUID())) {
htmlLocation = new File(outputFolder, "network");
} else {