From aa678a6bfab0e2e2436549e4faa70b5f18b91340 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 27 Oct 2011 00:41:12 +0200 Subject: After the selfupdate, check for the bukkit version. We will not automatically update bukkit, so the player is displayed a message, if he tries to update or install. --- .../src/com/earth2me/essentials/update/UpdateProcess.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'EssentialsUpdate') diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java index 977cb0ebc..70607923b 100644 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java @@ -76,6 +76,16 @@ public class UpdateProcess extends PlayerListener }).start(); return true; } + if (updateCheck.getResult() == UpdateCheck.CheckResult.NEW_ESS_BUKKIT) + { + final String message = "Please update bukkit to version " + updateCheck.getNewBukkitVersion() + " before updating Essentials."; + if (currentPlayer != null) + { + currentPlayer.sendMessage(message); + } + Bukkit.getLogger().log(Level.INFO, message); + return true; + } return false; } @@ -106,7 +116,7 @@ public class UpdateProcess extends PlayerListener if (currentPlayer.getName().equals(player.getName())) { currentPlayer = player; - player.sendMessage("You quit the game, while the installion wizard was running."); + player.sendMessage("You quit the game, while the installation wizard was running."); player.sendMessage("The installation wizard will now resume."); player.sendMessage("You can exit the wizard by typing quit into the chat."); stateMachine.resumeInstallation(player); -- cgit v1.2.3