summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-10-27 01:18:59 +0200
committersnowleo <schneeleo@gmail.com>2011-10-27 01:18:59 +0200
commit1e63f1f7be106cdb807b0ed1b3524f2268217f27 (patch)
tree4444186319c9d43795d4a9974761641b90fb3064 /EssentialsUpdate/src
parentaa678a6bfab0e2e2436549e4faa70b5f18b91340 (diff)
downloadEssentials-1e63f1f7be106cdb807b0ed1b3524f2268217f27.tar
Essentials-1e63f1f7be106cdb807b0ed1b3524f2268217f27.tar.gz
Essentials-1e63f1f7be106cdb807b0ed1b3524f2268217f27.tar.lz
Essentials-1e63f1f7be106cdb807b0ed1b3524f2268217f27.tar.xz
Essentials-1e63f1f7be106cdb807b0ed1b3524f2268217f27.zip
Don't block /essentialsupdate command after selfupdate
Diffstat (limited to 'EssentialsUpdate/src')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdateProcess.java25
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;