mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 06:48:50 +02:00
Fixed NoClassDefFoundError for 1.7.10 on enable
This commit is contained in:
parent
63b48bb2ee
commit
1053742533
@ -51,8 +51,14 @@ public class VersionCheckSystem implements SubSystem {
|
||||
String githubVersionUrl = "https://raw.githubusercontent.com/Rsl1122/Plan-PlayerAnalytics/master/Plan/src/main/resources/plugin.yml";
|
||||
String spigotUrl = "https://www.spigotmc.org/resources/plan-player-analytics.32536/";
|
||||
try {
|
||||
newVersionAvailable = Version.checkVersion(currentVersion, githubVersionUrl)
|
||||
|| Version.checkVersion(currentVersion, spigotUrl);
|
||||
newVersionAvailable = Version.checkVersion(currentVersion, githubVersionUrl);
|
||||
if (!newVersionAvailable) {
|
||||
try {
|
||||
newVersionAvailable = Version.checkVersion(currentVersion, spigotUrl);
|
||||
} catch (NoClassDefFoundError ignore) {
|
||||
/* 1.7.4 Does not have google gson JSONParser */
|
||||
}
|
||||
}
|
||||
if (newVersionAvailable) {
|
||||
String newVersionNotification = "New Version is available at " + spigotUrl;
|
||||
Log.infoColor("§a----------------------------------------");
|
||||
|
Loading…
Reference in New Issue
Block a user