diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-26 22:17:27 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-26 22:17:27 +0200 |
commit | f6e56ce0f4e01d5533883e7afcec159cbbbde771 (patch) | |
tree | 4916527879c29d0a3f118d260291019e8db31ff7 /EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java | |
parent | 72596decbae18e2f59fdd5f1fff78b304ca2e114 (diff) | |
download | Essentials-f6e56ce0f4e01d5533883e7afcec159cbbbde771.tar Essentials-f6e56ce0f4e01d5533883e7afcec159cbbbde771.tar.gz Essentials-f6e56ce0f4e01d5533883e7afcec159cbbbde771.tar.lz Essentials-f6e56ce0f4e01d5533883e7afcec159cbbbde771.tar.xz Essentials-f6e56ce0f4e01d5533883e7afcec159cbbbde771.zip |
Removing automatic updates
It's a bad idea to automatically overwrite files, without asking the player first.
This would be triggered by the selfupdate after the reload.
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java')
-rw-r--r-- | EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java deleted file mode 100644 index 95fdb2932..000000000 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.earth2me.essentials.update; - -import com.earth2me.essentials.update.tasks.InstallModule; -import java.util.Iterator; -import java.util.Map.Entry; -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.plugin.Plugin; - - -public class UpdatesDownloader extends WorkListener implements Runnable -{ - public UpdatesDownloader(final Plugin plugin, final VersionInfo newVersionInfo) - { - super(plugin, newVersionInfo); - } - - public void start() - { - iterator = getNewVersionInfo().getModules().entrySet().iterator(); - Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), this); - } - private transient Iterator<Entry<String, ModuleInfo>> iterator; - - @Override - public void run() - { - if (iterator.hasNext()) - { - final Entry<String, ModuleInfo> entry = iterator.next(); - final Plugin plugin = Bukkit.getPluginManager().getPlugin(entry.getKey()); - if (plugin == null) - { - run(); - } - else - { - new InstallModule(this, entry.getKey()).start(); - } - } - } - - @Override - public void onWorkAbort(final String message) - { - Bukkit.getLogger().log(Level.SEVERE, message); - } - - @Override - public void onWorkDone(final String message) - { - Bukkit.getLogger().log(Level.INFO, message); - Bukkit.getScheduler().scheduleAsyncDelayedTask(getPlugin(), this); - } -} |