1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Fix: Properly close inventory when opening forms

This commit is contained in:
onebeastchris
2025-09-20 16:23:24 +02:00
parent 7b0913ca86
commit 5abc03668f

View File

@@ -1682,8 +1682,9 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
// First close any dialogs that are open. This won't execute the dialog's closing action.
dialogManager.close();
// Also close current inventories, otherwise the form will not show
if (getOpenInventory() != null) {
InventoryUtils.closeInventory(this, getOpenInventory().getJavaId(), true);
if (inventoryHolder != null) {
InventoryUtils.sendJavaContainerClose(inventoryHolder);
InventoryUtils.closeInventory(this, inventoryHolder, true);
}
return doSendForm(form);
}