forked from zhdev/griefus
Split up utility class
This commit is contained in:
parent
828af8443f
commit
e2c2505b2b
97 changed files with 2369 additions and 2104 deletions
|
|
@ -34,7 +34,7 @@ import net.coreprotect.config.ConfigHandler;
|
|||
import net.coreprotect.language.Language;
|
||||
import net.coreprotect.language.Phrase;
|
||||
import net.coreprotect.utility.Chat;
|
||||
import net.coreprotect.utility.Util;
|
||||
import net.coreprotect.utility.VersionUtils;
|
||||
|
||||
public class NetworkHandler extends Language implements Runnable {
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ public class NetworkHandler extends Language implements Runnable {
|
|||
try {
|
||||
String lang = Config.getGlobal().LANGUAGE;
|
||||
String languageCode = lang.trim().toLowerCase();
|
||||
String pluginVersion = Util.getPluginVersion();
|
||||
String pluginVersion = VersionUtils.getPluginVersion();
|
||||
|
||||
if (!languageCode.startsWith("en") && languageCode.length() > 1) {
|
||||
boolean validCache = false;
|
||||
|
|
@ -290,7 +290,7 @@ public class NetworkHandler extends Language implements Runnable {
|
|||
int statusEdge = 0;
|
||||
HttpURLConnection connection = null;
|
||||
HttpURLConnection connectionEdge = null;
|
||||
String version = Util.getPluginVersion();
|
||||
String version = VersionUtils.getPluginVersion();
|
||||
|
||||
try {
|
||||
// CoreProtect Community Edition
|
||||
|
|
@ -329,7 +329,7 @@ public class NetworkHandler extends Language implements Runnable {
|
|||
if (response.length() > 0 && response.length() < 10) {
|
||||
String remoteVersion = response.replaceAll("[^0-9.]", "");
|
||||
if (remoteVersion.contains(".")) {
|
||||
boolean newVersion = Util.newVersion(version, remoteVersion);
|
||||
boolean newVersion = VersionUtils.newVersion(version, remoteVersion);
|
||||
if (newVersion) {
|
||||
latestVersion = remoteVersion;
|
||||
if (startup) {
|
||||
|
|
@ -361,7 +361,7 @@ public class NetworkHandler extends Language implements Runnable {
|
|||
if (response.length() > 0 && response.length() < 10) {
|
||||
String remoteVersion = response.replaceAll("[^0-9.]", "");
|
||||
if (remoteVersion.contains(".")) {
|
||||
boolean newVersion = Util.newVersion(version, remoteVersion);
|
||||
boolean newVersion = VersionUtils.newVersion(version, remoteVersion);
|
||||
if (newVersion) {
|
||||
latestEdgeVersion = remoteVersion;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue