Fixed NoClassDefFoundError for 1.7.10 on enable

This commit is contained in:
Rsl1122 2018-02-11 15:11:21 +02:00
parent 63b48bb2ee
commit 1053742533

View File

@ -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 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/"; String spigotUrl = "https://www.spigotmc.org/resources/plan-player-analytics.32536/";
try { try {
newVersionAvailable = Version.checkVersion(currentVersion, githubVersionUrl) newVersionAvailable = Version.checkVersion(currentVersion, githubVersionUrl);
|| Version.checkVersion(currentVersion, spigotUrl); if (!newVersionAvailable) {
try {
newVersionAvailable = Version.checkVersion(currentVersion, spigotUrl);
} catch (NoClassDefFoundError ignore) {
/* 1.7.4 Does not have google gson JSONParser */
}
}
if (newVersionAvailable) { if (newVersionAvailable) {
String newVersionNotification = "New Version is available at " + spigotUrl; String newVersionNotification = "New Version is available at " + spigotUrl;
Log.infoColor("§a----------------------------------------"); Log.infoColor("§a----------------------------------------");