mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-05 10:20:23 +01: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 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----------------------------------------");
|
||||||
|
Loading…
Reference in New Issue
Block a user