Update JavaSetSlotTranslator.java

This commit is contained in:
AJ Ferguson 2019-10-20 15:24:29 -08:00
parent 8ae803b9a5
commit 06358b2449

View file

@ -55,7 +55,6 @@ public class JavaSetSlotTranslator extends PacketTranslator<ServerSetSlotPacket>
cursorPacket.setSlot(ItemData.AIR);
session.getUpstream().sendPacket(cursorPacket);
Geyser.getGeneralThreadPool().schedule(() -> {
Inventory inventory = session.getInventoryCache().getOpenInventory();
if (inventory != null) {
session.setReopeningWindow(inventory.getId());
@ -64,8 +63,7 @@ public class JavaSetSlotTranslator extends PacketTranslator<ServerSetSlotPacket>
}
ContainerClosePacket closePacket = new ContainerClosePacket();
closePacket.setWindowId((byte) inventory.getId());
session.getUpstream().sendPacket(closePacket);
}, 150, TimeUnit.MILLISECONDS);
Geyser.getGeneralThreadPool().schedule(() -> session.getUpstream().sendPacket(closePacket), 150, TimeUnit.MILLISECONDS);
}
session.getInventory().setCursor(packet.getItem());