mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 03:28:30 +01:00
Threading Fix
This commit is contained in:
parent
656a40abb2
commit
9a3295439b
@ -41,7 +41,7 @@ public class Backup implements Runnable
|
|||||||
startTask();
|
startTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cleanup()
|
public synchronized void stopTask()
|
||||||
{
|
{
|
||||||
running = false;
|
running = false;
|
||||||
if (taskId != -1)
|
if (taskId != -1)
|
||||||
@ -141,7 +141,7 @@ public class Backup implements Runnable
|
|||||||
server.dispatchCommand(cs, "save-on");
|
server.dispatchCommand(cs, "save-on");
|
||||||
if (server.getOnlinePlayers().length == 0)
|
if (server.getOnlinePlayers().length == 0)
|
||||||
{
|
{
|
||||||
cleanup();
|
stopTask();
|
||||||
}
|
}
|
||||||
active = false;
|
active = false;
|
||||||
LOGGER.log(Level.INFO, _("backupFinished"));
|
LOGGER.log(Level.INFO, _("backupFinished"));
|
||||||
|
Loading…
Reference in New Issue
Block a user