Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Change updating so it doesn't tell you on current version up to date but warns if you're on a newer version than expected / older one in console.
Dieser Commit ist enthalten in:
Ursprung
30c4fea044
Commit
369710333c
@ -57,7 +57,7 @@ public class UpdateUtil {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Bukkit.getLogger().info(PREFIX + message);
|
plugin.getLogger().warning(message);
|
||||||
}
|
}
|
||||||
}.runTask(plugin);
|
}.runTask(plugin);
|
||||||
}
|
}
|
||||||
@ -75,10 +75,7 @@ public class UpdateUtil {
|
|||||||
if (current.compareTo(newest) < 0)
|
if (current.compareTo(newest) < 0)
|
||||||
return "There is a newer version available: " + newest.toString();
|
return "There is a newer version available: " + newest.toString();
|
||||||
else if (console) {
|
else if (console) {
|
||||||
if (current.compareTo(newest) == 0)
|
return "You are running a newer version than is released!";
|
||||||
return "You are running the newest version: " + current;
|
|
||||||
else
|
|
||||||
return "You are running a newer version than is released!";
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -86,7 +83,7 @@ public class UpdateUtil {
|
|||||||
private static String getNewestVersion() {
|
private static String getNewestVersion() {
|
||||||
String result = "";
|
String result = "";
|
||||||
try {
|
try {
|
||||||
URL url = new URL(URL + PLUGIN);
|
URL url = new URL(URL + PLUGIN + "?" + System.currentTimeMillis());
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setUseCaches(true);
|
connection.setUseCaches(true);
|
||||||
connection.addRequestProperty("User-Agent", "Mozilla/4.76");
|
connection.addRequestProperty("User-Agent", "Mozilla/4.76");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren