mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: Properly delete ChangeSets on history clear (#1413)
Fixes #1347 Co-authored-by: Jordan <dordsor21@gmail.com> Co-authored-by: Alex <mc.cache@web.de>
This commit is contained in:
parent
e0e3688361
commit
781bfc542f
@ -398,9 +398,20 @@ public class LocalSession implements TextureHolder {
|
||||
* Clear history.
|
||||
*/
|
||||
public void clearHistory() {
|
||||
history.clear();
|
||||
//FAWE start
|
||||
historyWriteLock.lock();
|
||||
try {
|
||||
// Ensure that changesets are properly removed
|
||||
for (Object item : history) {
|
||||
getChangeSet(item).delete();
|
||||
}
|
||||
history.clear();
|
||||
} finally {
|
||||
historyWriteLock.unlock();
|
||||
}
|
||||
|
||||
historyNegativeIndex = 0;
|
||||
save();
|
||||
historySize = 0;
|
||||
currentWorld = null;
|
||||
//FAWE end
|
||||
|
Loading…
Reference in New Issue
Block a user