diff --git a/Plan/pom.xml b/Plan/pom.xml
index 1bf81cf38..1fcc381f8 100644
--- a/Plan/pom.xml
+++ b/Plan/pom.xml
@@ -74,11 +74,10 @@
jar
provided
-
org.apache.commons
- commons-lang3
- 3.6
+ commons-text
+ 1.3
@@ -192,6 +191,12 @@
junit:*
+
+
+ org.apache
+ plan.org.apache
+
+
diff --git a/Plan/src/main/java/com/djrapitops/plan/data/Actions.java b/Plan/src/main/java/com/djrapitops/plan/data/Actions.java
index f7784fe22..d9f7a5a9e 100644
--- a/Plan/src/main/java/com/djrapitops/plan/data/Actions.java
+++ b/Plan/src/main/java/com/djrapitops/plan/data/Actions.java
@@ -4,7 +4,7 @@
*/
package com.djrapitops.plan.data;
-import org.apache.commons.lang3.text.WordUtils;
+import org.apache.commons.text.WordUtils;
/**
* IDs of various actions
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java
index e1855733f..c1aaba26f 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/info/request/CacheInspectPageRequest.java
@@ -17,7 +17,7 @@ import com.djrapitops.plan.system.webserver.response.pages.InspectPageResponse;
import com.djrapitops.plan.utilities.Base64Util;
import com.djrapitops.plan.utilities.file.export.HtmlExport;
import com.djrapitops.plugin.utilities.Verify;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.util.Collections;
import java.util.Map;
@@ -63,7 +63,7 @@ public class CacheInspectPageRequest extends InfoRequestWithVariables implements
Map replace = Collections.singletonMap("networkName", ServerInfo.getServerName());
boolean export = Settings.ANALYSIS_EXPORT.isTrue();
- cache(export, uuid, StrSubstitutor.replace(Base64Util.decode(html), replace));
+ cache(export, uuid, StringSubstitutor.replace(Base64Util.decode(html), replace));
return DefaultResponses.SUCCESS.get();
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/settings/config/SpongeConfigSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/settings/config/SpongeConfigSystem.java
index 5d88d7fe0..477a57ab7 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/settings/config/SpongeConfigSystem.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/settings/config/SpongeConfigSystem.java
@@ -26,7 +26,9 @@ public class SpongeConfigSystem extends ServerConfigSystem {
protected void copyDefaults() throws IOException {
super.copyDefaults();
if (firstInstall) {
- Log.info("WebServer and Geolocations disabled by default. Please enable them in the config.");
+ Log.info("§eWebServer and Geolocations disabled by default on Sponge servers. You can enable them in the config:");
+ Log.info("§e " + Settings.WEBSERVER_DISABLED.getPath());
+ Log.info("§e " + Settings.DATA_GEOLOCATIONS.getPath());
Settings.WEBSERVER_DISABLED.set(true);
Settings.DATA_GEOLOCATIONS.set(false);
Settings.save();
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/settings/locale/Message.java b/Plan/src/main/java/com/djrapitops/plan/system/settings/locale/Message.java
index 563ebfe6e..957b19aca 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/settings/locale/Message.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/settings/locale/Message.java
@@ -1,7 +1,7 @@
package com.djrapitops.plan.system.settings.locale;
import com.djrapitops.plugin.utilities.Verify;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.io.Serializable;
import java.util.HashMap;
@@ -30,7 +30,7 @@ public class Message {
replaceMap.put(String.valueOf(i), p[i].toString());
}
- StrSubstitutor sub = new StrSubstitutor(replaceMap);
+ StringSubstitutor sub = new StringSubstitutor(replaceMap);
return sub.replace(content);
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/JavaScriptResponse.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/JavaScriptResponse.java
index 884df375a..bcfba7697 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/JavaScriptResponse.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/JavaScriptResponse.java
@@ -2,7 +2,7 @@ package com.djrapitops.plan.system.webserver.response;
import com.djrapitops.plan.system.settings.theme.Theme;
import com.djrapitops.plan.system.settings.theme.ThemeVal;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.util.HashMap;
import java.util.Map;
@@ -18,6 +18,6 @@ public class JavaScriptResponse extends FileResponse {
super.setType(ResponseType.JAVASCRIPT);
Map replace = new HashMap<>();
replace.put("defaultTheme", Theme.getValue(ThemeVal.THEME_DEFAULT));
- setContent(StrSubstitutor.replace(Theme.replaceColors(getContent()), replace));
+ setContent(StringSubstitutor.replace(Theme.replaceColors(getContent()), replace));
}
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/errors/ErrorResponse.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/errors/ErrorResponse.java
index 26a50d66f..db2e8cad7 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/errors/ErrorResponse.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/errors/ErrorResponse.java
@@ -9,7 +9,7 @@ import com.djrapitops.plan.system.webserver.response.Response;
import com.djrapitops.plan.utilities.MiscUtils;
import com.djrapitops.plan.utilities.file.FileUtil;
import com.djrapitops.plugin.api.utility.log.Log;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.io.IOException;
import java.util.HashMap;
@@ -41,7 +41,7 @@ public class ErrorResponse extends Response {
placeHolders.put("paragraph", paragraph);
placeHolders.put("version", MiscUtils.getPlanVersion());
- setContent(StrSubstitutor.replace(getContent(), placeHolders));
+ setContent(StringSubstitutor.replace(getContent(), placeHolders));
}
public void setTitle(String title) {
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/InspectPageResponse.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/InspectPageResponse.java
index a072ee71c..3735fe690 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/InspectPageResponse.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/InspectPageResponse.java
@@ -6,7 +6,7 @@ import com.djrapitops.plan.system.webserver.response.cache.PageId;
import com.djrapitops.plan.system.webserver.response.cache.ResponseCache;
import com.djrapitops.plan.system.webserver.response.errors.ErrorResponse;
import com.djrapitops.plan.system.webserver.response.pages.parts.InspectPagePluginsContent;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.util.HashMap;
import java.util.Map;
@@ -35,7 +35,7 @@ public class InspectPageResponse extends Response {
replaceMap.put("navPluginsTabs", inspectPagePluginsTab[0]);
replaceMap.put("pluginsTabs", inspectPagePluginsTab[1]);
- return StrSubstitutor.replace(super.getContent(), replaceMap);
+ return StringSubstitutor.replace(super.getContent(), replaceMap);
}
private String[] getCalculating() {
diff --git a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/PlayersPageResponse.java b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/PlayersPageResponse.java
index ace6d0bfc..5afde7d68 100644
--- a/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/PlayersPageResponse.java
+++ b/Plan/src/main/java/com/djrapitops/plan/system/webserver/response/pages/PlayersPageResponse.java
@@ -20,7 +20,7 @@ import com.djrapitops.plan.utilities.file.FileUtil;
import com.djrapitops.plan.utilities.html.Html;
import com.djrapitops.plugin.api.Check;
import com.djrapitops.plugin.api.utility.log.Log;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.io.IOException;
import java.util.*;
@@ -47,7 +47,7 @@ public class PlayersPageResponse extends Response {
}
replace.put("playersTable", buildPlayersTable(db));
replace.put("version", plugin.getVersion());
- super.setContent(Theme.replaceColors(StrSubstitutor.replace(FileUtil.getStringFromResource("web/players.html"), replace)));
+ super.setContent(Theme.replaceColors(StringSubstitutor.replace(FileUtil.getStringFromResource("web/players.html"), replace)));
} catch (DBException | IOException e) {
Log.toLog(this.getClass(), e);
setContent(new InternalErrorResponse("/players", e).getContent());
diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java
index 885a80d85..8873663fa 100644
--- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java
+++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/Html.java
@@ -1,6 +1,6 @@
package com.djrapitops.plan.utilities.html;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.io.Serializable;
import java.util.HashMap;
@@ -131,7 +131,7 @@ public enum Html {
replaceMap.put(String.valueOf(i), p[i]);
}
- StrSubstitutor sub = new StrSubstitutor(replaceMap);
+ StringSubstitutor sub = new StringSubstitutor(replaceMap);
sub.setEnableSubstitutionInVariables(false);
return sub.replace(html);
}
diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlUtils.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlUtils.java
index 9112bef4a..53358ed0d 100644
--- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlUtils.java
+++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/HtmlUtils.java
@@ -2,7 +2,7 @@ package com.djrapitops.plan.utilities.html;
import com.djrapitops.plan.system.info.server.ServerInfo;
import com.djrapitops.plan.system.settings.Settings;
-import org.apache.commons.lang3.text.StrSubstitutor;
+import org.apache.commons.text.StringSubstitutor;
import java.io.Serializable;
import java.util.Map;
@@ -27,7 +27,7 @@ public class HtmlUtils {
* @return Html with placeholders replaced
*/
public static String replacePlaceholders(String html, Map replaceMap) {
- StrSubstitutor sub = new StrSubstitutor(replaceMap);
+ StringSubstitutor sub = new StringSubstitutor(replaceMap);
sub.setEnableSubstitutionInVariables(true);
return sub.replace(html);
}