mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:48:34 +00:00
Correctly queue edits
Synchronising on the LocalSession ends up being dangerous as it's a craftbukkit thread, leading to blocking issues if something goes wrong in an edit, made worse by the fact craftbukkit threads like to interfere with each other sometimes, and also cause OOMs and hanging when there are too many of them.
This commit is contained in:
@ -649,13 +649,12 @@ public final class PlatformCommandManager {
|
||||
} else {
|
||||
actor.decline();
|
||||
}
|
||||
LocalSession session = worldEdit.getSessionManager().get(actor);
|
||||
synchronized (session) {
|
||||
actor.runAction(() -> {
|
||||
SessionKey key = actor.getSessionKey();
|
||||
if (key.isActive()) {
|
||||
PlatformCommandManager.this.handleCommandOnCurrentThread(event);
|
||||
}
|
||||
}
|
||||
}, false, true);
|
||||
}, Fawe.isMainThread());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user