From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 16 May 2016 20:47:41 -0400 Subject: [PATCH] Async GameProfileCache saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 1766cd6d83aee31800364402dbe4a439c56e63d0..b46cffe141921e499a47dac08318f167f21a5509 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -914,7 +914,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper try { BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8); @@ -292,6 +293,14 @@ public class GameProfileCache { } catch (IOException ioexception) { ; } + // Paper start + }; + if (asyncSave) { + io.papermc.paper.util.MCUtil.scheduleAsyncTask(save); + } else { + save.run(); + } + // Paper end }