Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 11:00:04 +01: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>
Dieser Commit ist enthalten in:
Ursprung
e0e3688361
Commit
781bfc542f
@ -398,9 +398,20 @@ public class LocalSession implements TextureHolder {
|
|||||||
* Clear history.
|
* Clear history.
|
||||||
*/
|
*/
|
||||||
public void clearHistory() {
|
public void clearHistory() {
|
||||||
history.clear();
|
|
||||||
//FAWE start
|
//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;
|
historyNegativeIndex = 0;
|
||||||
|
save();
|
||||||
historySize = 0;
|
historySize = 0;
|
||||||
currentWorld = null;
|
currentWorld = null;
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren