Skip to content

Commit

Permalink
fix: Fix persistent item saving on player inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeltumn committed Sep 6, 2024
1 parent 1f4f8c4 commit 7a25644
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public class InterfacesListeners private constructor(private val plugin: Plugin)
// Saves any persistent items stored in the main inventory whenever we are currently
// showing a combined or player inventory before we draw the new one over-top
val currentlyShown = convertHolderToInterfaceView(player.openInventory.topInventory.holder)
?: getBackgroundPlayerInterface(player.uniqueId)
if (currentlyShown != null && currentlyShown !is ChestInterfaceView) {
currentlyShown.savePersistentItems(player.inventory)
}
Expand Down

0 comments on commit 7a25644

Please sign in to comment.