mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-05-06 07:41:17 +00:00
Don't block /essentialsupdate command after selfupdate
This commit is contained in:
parent
fd7894caae
commit
e0a29ed6a0
1 changed files with 23 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue