diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-26 20:24:46 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-26 20:24:46 +0200 |
commit | c15d26acc0d044ec08be3abd65fb2dd41c0576c8 (patch) | |
tree | 590f517a65756dc99bed515252ec54f347b749c7 /EssentialsUpdate/src | |
parent | 83ea6dd721f5a875d5386a70cf0d2c4acc8292ac (diff) | |
download | Essentials-c15d26acc0d044ec08be3abd65fb2dd41c0576c8.tar Essentials-c15d26acc0d044ec08be3abd65fb2dd41c0576c8.tar.gz Essentials-c15d26acc0d044ec08be3abd65fb2dd41c0576c8.tar.lz Essentials-c15d26acc0d044ec08be3abd65fb2dd41c0576c8.tar.xz Essentials-c15d26acc0d044ec08be3abd65fb2dd41c0576c8.zip |
Cleanup
Diffstat (limited to 'EssentialsUpdate/src')
-rw-r--r-- | EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java index c582ebd53..393bf5aef 100644 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.update; import com.earth2me.essentials.update.states.InstallationFinishedEvent; import com.earth2me.essentials.update.states.StateMachine; import java.util.List; +import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -26,6 +27,7 @@ public class UpdateProcess extends PlayerListener public UpdateProcess(final Plugin plugin, final UpdateCheck updateCheck) { + super(); this.plugin = plugin; this.updateCheck = updateCheck; } @@ -36,16 +38,16 @@ public class UpdateProcess extends PlayerListener pluginManager.registerEvent(Type.PLAYER_QUIT, this, Priority.Low, plugin); pluginManager.registerEvent(Type.PLAYER_CHAT, this, Priority.Lowest, plugin); pluginManager.registerEvent(Type.PLAYER_JOIN, this, Priority.Normal, plugin); - pluginManager.registerEvent(Type.CUSTOM_EVENT, new CustomEventListener(){ - + pluginManager.registerEvent(Type.CUSTOM_EVENT, new CustomEventListener() + { @Override public void onCustomEvent(final Event event) { - if(event instanceof InstallationFinishedEvent) { + if (event instanceof InstallationFinishedEvent) + { UpdateProcess.this.currentPlayer = null; } } - }, Priority.Normal, plugin); } @@ -73,7 +75,8 @@ public class UpdateProcess extends PlayerListener public void onPlayerJoin(final PlayerJoinEvent event) { final Player player = event.getPlayer(); - if (currentPlayer.getName().equals(player.getName())) { + if (currentPlayer.getName().equals(player.getName())) + { currentPlayer = player; player.sendMessage("You quit the game, while the installion wizard was running."); player.sendMessage("The installation wizard will now resume."); @@ -109,10 +112,10 @@ public class UpdateProcess extends PlayerListener final VersionInfo info = updateCheck.getNewVersionInfo(); final List<String> changelog = info.getChangelog(); - Bukkit.getLogger().info("Essentials changelog " + updateCheck.getNewVersion().toString()); + Bukkit.getLogger().log(Level.INFO, "Essentials changelog {0}", updateCheck.getNewVersion().toString()); for (String line : changelog) { - Bukkit.getLogger().info(" - " + line); + Bukkit.getLogger().log(Level.INFO, " - {0}", line); } final UpdatesDownloader downloader = new UpdatesDownloader(plugin, info); downloader.start(); |