Merge branch 'main' into major/2.0.0/1.18

This commit is contained in:
dordsor21
2021-12-20 20:28:15 +00:00
9 changed files with 58 additions and 50 deletions

View File

@ -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