diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java index b0b9ad4b..7498d45b 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java @@ -133,7 +133,8 @@ public static boolean awaitExistence(Path path, long timeout, TimeUnit unit) thr while (!Files.exists(path)) { long now = System.currentTimeMillis(); if (now >= endTime) return false; - watchService.poll(endTime - now, TimeUnit.MILLISECONDS).reset(); + WatchKey key = watchService.poll(endTime - now, TimeUnit.MILLISECONDS); + if (key != null) key.reset(); } return true; }