From a24d6ff0189e7ab29157ca6877ed137c104b8f86 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sun, 27 Mar 2016 11:46:00 -0500 Subject: [PATCH] Missed removals --- src/main/java/com/gmail/nossr50/mcMMO.java | 11 ------ .../runnables/UpdaterResultAsyncTask.java | 36 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 src/main/java/com/gmail/nossr50/runnables/UpdaterResultAsyncTask.java diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 2dd43708f..fc5f069e1 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -35,7 +35,6 @@ import com.gmail.nossr50.listeners.WorldListener; import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.runnables.CheckDateTask; import com.gmail.nossr50.runnables.SaveTimerTask; -import com.gmail.nossr50.runnables.UpdaterResultAsyncTask; import com.gmail.nossr50.runnables.backups.CleanBackupsTask; import com.gmail.nossr50.runnables.database.UserPurgeTask; import com.gmail.nossr50.runnables.party.PartyAutoKickTask; @@ -179,8 +178,6 @@ public class mcMMO extends JavaPlugin { placeStore = ChunkManagerFactory.getChunkManager(); // Get our ChunkletManager - checkForUpdates(); - if (Config.getInstance().getPTPCommandWorldPermissions()) { Permissions.generateWorldTeleportPermissions(); } @@ -379,14 +376,6 @@ public class mcMMO extends JavaPlugin { currentFlatfilePath.mkdirs(); } - private void checkForUpdates() { - if (!Config.getInstance().getUpdateCheckEnabled()) { - return; - } - - new UpdaterResultAsyncTask(this).runTaskAsynchronously(mcMMO.p); - } - private void loadConfigFiles() { // Force the loading of config files TreasureConfig.getInstance(); diff --git a/src/main/java/com/gmail/nossr50/runnables/UpdaterResultAsyncTask.java b/src/main/java/com/gmail/nossr50/runnables/UpdaterResultAsyncTask.java deleted file mode 100644 index 522230de7..000000000 --- a/src/main/java/com/gmail/nossr50/runnables/UpdaterResultAsyncTask.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.gmail.nossr50.runnables; - -import org.bukkit.scheduler.BukkitRunnable; - -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.config.Config; -import com.gmail.nossr50.locale.LocaleLoader; - -import net.gravitydevelopment.updater.mcmmo.Updater; - -public class UpdaterResultAsyncTask extends BukkitRunnable { - private mcMMO plugin; - - public UpdaterResultAsyncTask(mcMMO plugin) { - this.plugin = plugin; - } - - @Override - public void run() { - Updater updater = new Updater(plugin, 31030, plugin.mcmmo, Updater.UpdateType.NO_DOWNLOAD, false); - - if (updater.getResult() != Updater.UpdateResult.UPDATE_AVAILABLE) { - plugin.setUpdateAvailable(false); - return; - } - - if (updater.getLatestType().equals("beta") && !Config.getInstance().getPreferBeta()) { - plugin.setUpdateAvailable(false); - return; - } - - plugin.setUpdateAvailable(true); - plugin.getLogger().info(LocaleLoader.getString("UpdateChecker.Outdated")); - plugin.getLogger().info(LocaleLoader.getString("UpdateChecker.NewAvailable")); - } -}