Decided to not use auto-updating after all, since it's a pain in the ass

This commit is contained in:
Rammelkast committed 2016-05-30 19:51:16 +02:00
1 parent bd01cc376a
commit d04c27828f
4 files changed
+1 -87

No files matched your search

@@ -49,8 +49,6 @@ public class AntiCheat extends JavaPlugin {
private static AntiCheatManager manager;
private static AntiCheat plugin;
private static List<Listener> eventList = new ArrayList<Listener>();
private static boolean update = false;
private static String updateDetails = null;
private static Configuration config;
private static boolean verbose;
private static boolean developer;
@@ -73,7 +71,6 @@ public class AntiCheat extends JavaPlugin {
setupConfig();
setupEvents();
setupCommands();
setupUpdater();
setupProtocol();
// Enterprise must come before levels
setupEnterprise();
@@ -101,25 +98,6 @@ public class AntiCheat extends JavaPlugin {
KillAuraCheck.listenPackets();
}
private void setupUpdater() {
if (config.getConfig().autoUpdate.getValue()) {
final File file = this.getFile();
final Plugin plugin = this;
getServer().getScheduler().runTaskAsynchronously(this, new Runnable() {
@Override
public void run() {
verboseLog("Checking for a new update...");
Updater updater = new Updater(plugin, PROJECT_ID, file, Updater.UpdateType.DEFAULT, false);
update = updater.getResult() == Updater.UpdateResult.SUCCESS;
verboseLog("Update available: " + update);
if (update) {
updateDetails = updater.getLatestName() + " for " + updater.getLatestGameVersion();
}
}
});
}
}
@Override
public void onDisable() {
verboseLog("Saving user levels...");
@@ -184,14 +162,6 @@ public class AntiCheat extends JavaPlugin {
return manager;
}
public static boolean isUpdated() {
return !update;
}
public static String getUpdateDetails() {
return updateDetails;
}
public static String getVersion() {
return manager.getPlugin().getDescription().getVersion();
}