summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
index d4ee6c0fc..98dbeb2ef 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/EssentialsUpdate.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.update;
import com.earth2me.essentials.update.UpdateCheck.CheckResult;
+import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -16,26 +17,20 @@ public class EssentialsUpdate extends JavaPlugin
public void onEnable()
{
if (!getDataFolder().exists() && !getDataFolder().mkdirs() ) {
- Bukkit.getLogger().severe("Could not create data folder:"+getDataFolder().getPath());
+ Bukkit.getLogger().log(Level.SEVERE, "Could not create data folder: {0}", getDataFolder().getPath());
}
essentialsHelp = new EssentialsHelp(this);
essentialsHelp.registerEvents();
final UpdateCheck updateCheck = new UpdateCheck(this);
+ updateCheck.checkForUpdates();
updateProcess = new UpdateProcess(this, updateCheck);
updateProcess.registerEvents();
- Bukkit.getLogger().info("EssentialsUpdate " + getDescription().getVersion() + " loaded.");
+ Bukkit.getLogger().log(Level.INFO, "EssentialsUpdate {0} loaded.", getDescription().getVersion());
if (updateCheck.isEssentialsInstalled())
{
- updateCheck.checkForUpdates();
- 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