forked from Upstream/mmocore
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