diff options
Diffstat (limited to 'EssentialsUpdate/src/com')
-rw-r--r-- | EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java index 70607923b..1b26f1d32 100644 --- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java @@ -65,13 +65,33 @@ public class UpdateProcess extends PlayerListener @Override public void onWorkAbort(final String message) { - Bukkit.getLogger().log(Level.SEVERE, message); + if (message != null && !message.isEmpty() + && UpdateProcess.this.currentPlayer != null + && UpdateProcess.this.currentPlayer.isOnline()) + { + UpdateProcess.this.currentPlayer.sendMessage(message); + } + if (message != null && !message.isEmpty()) + { + Bukkit.getLogger().log(Level.SEVERE, message); + } + UpdateProcess.this.currentPlayer = null; } @Override public void onWorkDone(final String message) { - Bukkit.getLogger().log(Level.INFO, message); + if (message != null && !message.isEmpty() + && UpdateProcess.this.currentPlayer != null + && UpdateProcess.this.currentPlayer.isOnline()) + { + UpdateProcess.this.currentPlayer.sendMessage(message); + } + if (message != null && !message.isEmpty()) + { + Bukkit.getLogger().log(Level.INFO, message); + } + UpdateProcess.this.currentPlayer = null; } }).start(); return true; @@ -84,6 +104,7 @@ public class UpdateProcess extends PlayerListener currentPlayer.sendMessage(message); } Bukkit.getLogger().log(Level.INFO, message); + currentPlayer = null; return true; } return false; |