mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 12:05:13 +01:00
Fix syncronization issue with the marker-api
This commit is contained in:
parent
c31945444d
commit
470a5cbad1
@ -92,6 +92,7 @@ public synchronized void load() throws IOException {
|
||||
}
|
||||
|
||||
private synchronized void load(boolean overwriteChanges) throws IOException {
|
||||
synchronized (MarkerAPIImpl.class) {
|
||||
Set<String> externallyRemovedSets = new HashSet<>(markerSets.keySet());
|
||||
|
||||
if (markerFile.exists() && markerFile.isFile()) {
|
||||
@ -132,9 +133,11 @@ private synchronized void load(boolean overwriteChanges) throws IOException {
|
||||
removedMarkerSets.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void save() throws IOException {
|
||||
synchronized (MarkerAPIImpl.class) {
|
||||
load(false);
|
||||
|
||||
FileUtils.createFile(markerFile);
|
||||
@ -150,5 +153,6 @@ public synchronized void save() throws IOException {
|
||||
|
||||
removedMarkerSets.clear();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user