Skip to content

Commit

Permalink
v1.4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
byteful committed Jun 23, 2024
1 parent 4869088 commit e5e770a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ public FileBlockDataManager(Path file, Scheduler scheduler) {
}

private void save() {
final Set<String> lines = cache.stream().map(x -> String.format("{%s}{%s}{%s}%s", x.getX(), x.getY(), x.getZ(), x.getWorld())).collect(Collectors.toSet());
final Set<String> lines;
synchronized (cache) {
lines = cache.stream()
.map(x -> String.format("{%s}{%s}{%s}%s", x.getX(), x.getY(), x.getZ(), x.getWorld()))
.collect(Collectors.toSet());
}

try {
Files.write(file, lines, StandardCharsets.UTF_8);
Expand Down

0 comments on commit e5e770a

Please sign in to comment.