From 1d8995efe6d8457e9e2809a0112e06a579ca70a8 Mon Sep 17 00:00:00 2001 From: AJ Ferguson Date: Thu, 4 Jun 2020 10:49:32 -0800 Subject: [PATCH] Add minimum delay between closing and opening a new window (#735) Should fix new windows not showing up with some plugins like Lottery. --- .../bedrock/BedrockContainerCloseTranslator.java | 2 -- .../java/window/JavaOpenWindowTranslator.java | 10 ++-------- .../org/geysermc/connector/utils/InventoryUtils.java | 8 +++++++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockContainerCloseTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockContainerCloseTranslator.java index 05eac2032..4c531c485 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockContainerCloseTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockContainerCloseTranslator.java @@ -53,8 +53,6 @@ public class BedrockContainerCloseTranslator extends PacketTranslator 0) { GeyserConnector.getInstance().getGeneralThreadPool().schedule(() -> { translator.openInventory(session, inventory); translator.updateInventory(session, inventory); - }, 200, TimeUnit.MILLISECONDS); + }, delay, TimeUnit.MILLISECONDS); } else { translator.openInventory(session, inventory); translator.updateInventory(session, inventory);