From 54f078724f7ce407b1a6dc525c441e8638f9a225 Mon Sep 17 00:00:00 2001 From: Jikoo Date: Wed, 11 Sep 2024 11:42:04 -0400 Subject: [PATCH] also quits Boy, and I thought having to make the first commit was embarrassing, wait till people see that I realized that was missing and didn't think about the counterpart. At least I did think about it though, I wasn't even testing on 1.20 where it would break things. --- .../main/java/com/lishid/openinv/util/InventoryManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/com/lishid/openinv/util/InventoryManager.java b/plugin/src/main/java/com/lishid/openinv/util/InventoryManager.java index deebb1ec..9cbc82c0 100644 --- a/plugin/src/main/java/com/lishid/openinv/util/InventoryManager.java +++ b/plugin/src/main/java/com/lishid/openinv/util/InventoryManager.java @@ -120,7 +120,10 @@ private void onPlayerJoin(@NotNull PlayerJoinEvent event) { @Keep @EventHandler(priority = EventPriority.MONITOR) private void onPlayerQuit(@NotNull PlayerQuitEvent event) { - consumeLoaded(event.getPlayer().getUniqueId(), inventory -> checkViewerAccess(inventory, false)); + consumeLoaded(event.getPlayer().getUniqueId(), inventory -> { + inventory.setPlayerOffline(); + checkViewerAccess(inventory, false); + }); } @Keep