From 40d52d23550c4e8d9cee6533cf053fc8bb85c329 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 23 Feb 2023 18:01:17 +0100 Subject: [PATCH] Fix Memory Leak2 --- SpigotCore_Main/src/de/steamwar/entity/REntityServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java b/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java index b2bec15..1ed4c6f 100644 --- a/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java +++ b/SpigotCore_Main/src/de/steamwar/entity/REntityServer.java @@ -197,7 +197,6 @@ public class REntityServer implements Listener { @EventHandler public void onQuit(PlayerQuitEvent e) { Player player = e.getPlayer(); - viewDistance.remove(player); Location location = lastLocation.remove(player); if(location == null) return; @@ -209,6 +208,7 @@ public class REntityServer implements Listener { if(playersInChunk.isEmpty()) players.remove(id); }); + viewDistance.remove(player); } private void onMissing(Set of, Set in, Consumer> packetProvider) {