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:
@@ -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.
|
// First close any dialogs that are open. This won't execute the dialog's closing action.
|
||||||
dialogManager.close();
|
dialogManager.close();
|
||||||
// Also close current inventories, otherwise the form will not show
|
// Also close current inventories, otherwise the form will not show
|
||||||
if (getOpenInventory() != null) {
|
if (inventoryHolder != null) {
|
||||||
InventoryUtils.closeInventory(this, getOpenInventory().getJavaId(), true);
|
InventoryUtils.sendJavaContainerClose(inventoryHolder);
|
||||||
|
InventoryUtils.closeInventory(this, inventoryHolder, true);
|
||||||
}
|
}
|
||||||
return doSendForm(form);
|
return doSendForm(form);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user