From 2a142a1f3f3f7ef6e5d4c73c0698369fbf45110d Mon Sep 17 00:00:00 2001 From: Liyan Zhao Date: Thu, 25 Jul 2024 19:27:08 +0800 Subject: [PATCH] fix: #62 --- src/main/java/dev/dubhe/gugle/carpet/GcaExtension.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dev/dubhe/gugle/carpet/GcaExtension.java b/src/main/java/dev/dubhe/gugle/carpet/GcaExtension.java index 23292e7..5ae7dd8 100644 --- a/src/main/java/dev/dubhe/gugle/carpet/GcaExtension.java +++ b/src/main/java/dev/dubhe/gugle/carpet/GcaExtension.java @@ -69,7 +69,7 @@ public void onGameStarted() { public void onServerClosed(MinecraftServer server) { if (GcaSetting.fakePlayerResident) { JsonObject fakePlayerList = new JsonObject(); - server.getPlayerList().getPlayers().forEach(player -> { + fakePlayerInventoryContainerMap.keySet().forEach(player -> { if (!(player instanceof EntityPlayerMPFake)) return; if (player.saveWithoutId(new CompoundTag()).contains("gca.NoResident")) return; String username = player.getGameProfile().getName();