summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/com/earth2me
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-10-26 22:17:27 +0200
committersnowleo <schneeleo@gmail.com>2011-10-26 22:17:27 +0200
commitf6e56ce0f4e01d5533883e7afcec159cbbbde771 (patch)
tree4916527879c29d0a3f118d260291019e8db31ff7 /EssentialsUpdate/src/com/earth2me
parent72596decbae18e2f59fdd5f1fff78b304ca2e114 (diff)
downloadEssentials-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')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java6
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java17
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdatesDownloader.java55
3 files changed, 0 insertions, 78 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
index 6b380288a..98dbeb2ef 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
@@ -31,12 +31,6 @@ public class EssentialsUpdate extends JavaPlugin
if (updateCheck.isEssentialsInstalled())
{
- final Version myVersion = new Version(getDescription().getVersion());
- if (updateCheck.getResult() == CheckResult.NEW_ESS && myVersion.equals(updateCheck.getNewVersion()))
- {
- Bukkit.getLogger().info("Versions of EssentialsUpdate and Essentials do not match. Starting automatic update.");
- updateProcess.doAutomaticUpdate();
- }
updateCheck.scheduleUpdateTask();
}
else
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java
index 38fefb111..c1dc16702 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java
@@ -1,12 +1,8 @@
package com.earth2me.essentials.update;
-import com.earth2me.essentials.update.states.Changelog;
-import com.earth2me.essentials.update.states.EssentialsChat;
import com.earth2me.essentials.update.states.InstallationFinishedEvent;
import com.earth2me.essentials.update.states.StateMachine;
-import com.earth2me.essentials.update.states.UpdateOrInstallation;
import com.earth2me.essentials.update.tasks.SelfUpdate;
-import java.util.List;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
@@ -139,19 +135,6 @@ public class UpdateProcess extends PlayerListener
}
}
- public void doAutomaticUpdate()
- {
- final VersionInfo info = updateCheck.getNewVersionInfo();
- final List<String> changelog = info.getChangelog();
- Bukkit.getLogger().log(Level.INFO, "Essentials changelog {0}", updateCheck.getNewVersion().toString());
- for (String line : changelog)
- {
- Bukkit.getLogger().log(Level.INFO, " - {0}", line);
- }
- final UpdatesDownloader downloader = new UpdatesDownloader(plugin, info);
- downloader.start();
- }
-
public void onCommand(final CommandSender sender)
{
if (sender instanceof Player && sender.hasPermission("essentials.update"))
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);
- }
-}