Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ public void closeInventory(Player player, InventoryEngine inventoryDefault) {
menuPlugin.getScheduler().runAtEntityLater(player, task -> {
InventoryHolder newHolder = CompatibilityUtil.getTopInventory(player).getHolder();
boolean isInNewzMenuInventory = newHolder instanceof InventoryDefault;
if (newHolder != null && !(newHolder instanceof InventoryDefault)) {
// A null holder is still another inventory (InvUI windows, Bukkit.createInventory(null, ...)), not a zMenu one
if (!isInNewzMenuInventory) {

List<ItemStack> sessionItems = this.clearInventory && this.clearInvType != ClearInvType.PACKET_EVENT ? this.collectSessionItems(player, inventoryDefault) : Collections.emptyList();

Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Added `ActionPlayerData#getScope`. `ZActionPlayerData` now takes the `MenuPlugin` and a `VariableScope`.
* Removed the legacy `ClassicMeta` formatter. zMenu always formats items, messages and titles with MiniMessage through `ComponentMeta`. If it cannot start, zMenu logs an error and disables itself. `enable-mini-message-format` now only controls Dialogs support.
* You must use zMenu+ to be able to use the hot reload.
* Fixed `clear-inventory` menus not giving the player's inventory back when they open an inventory without holder, such as an InvUI window or `Bukkit.createInventory(null, ...)`, from a menu: the player kept the `player-inventory` buttons as real items in place of their own items, until they reconnected or closed another menu with `clear-inventory`.

## New Features

Expand Down
Loading