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 b62d7b2e974f9eafb8e60ddb9ed58273b0393185..9e5271d39e4a15a71c59a8560edd59c75ec6dd52 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -942,7 +942,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper try { BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8); @@ -306,6 +307,14 @@ public class GameProfileCache { } catch (IOException ioexception) { ; } + // Paper start + }; + if (asyncSave) { + net.minecraft.server.MCUtil.scheduleAsyncTask(save); + } else { + save.run(); + } + // Paper end }