mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Solves the /restart issue.
This commit is contained in:
parent
c03400228f
commit
f559d767d2
@ -314,6 +314,12 @@ public class MMOCore extends JavaPlugin {
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
//Executes all the pending asynchronous task (like saving the playerData)
|
||||
Bukkit.getScheduler().getPendingTasks().forEach(worker -> {
|
||||
if (worker.getOwner().equals(this)) {
|
||||
((Runnable) worker).run();
|
||||
}
|
||||
});
|
||||
// Save player data
|
||||
for (PlayerData data : PlayerData.getAll())
|
||||
if (data.isFullyLoaded()) {
|
||||
|
Loading…
Reference in New Issue
Block a user