This commit is contained in:
mastermc05 2022-08-08 11:00:32 +03:00
parent 3b0814e853
commit d0e9b66d4a
2 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,8 @@ public class AsyncChunkProvider118_2 {
try {
return getAsyncSaveData.invoke(null, world.getHandle(), c);
} catch (IllegalAccessException | InvocationTargetException e) {
//Save as from main thread
if (((CraftServer) Bukkit.getServer()).getServer().hasStopped()) return null;
throw new RuntimeException(e);
}
}, ((CraftServer) Bukkit.getServer()).getServer());

View File

@ -95,6 +95,8 @@ public class AsyncChunkProvider119 {
try {
return getAsyncSaveData.invoke(null, world.getHandle(), c);
} catch (ReflectiveOperationException e) {
//Save as from main thread
if (((CraftServer) Bukkit.getServer()).getServer().hasStopped()) return null;
throw new RuntimeException(e);
}
}, ((CraftServer) Bukkit.getServer()).getServer());