lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
120 stars 97 forks source link

Players not getting removed from InventoryViewers #115

Closed Sn0wStorm closed 4 years ago

Sn0wStorm commented 4 years ago

When a Player has silentchest enabled, closing a chest will not remove the Player from the List of InventoryViewers. Any time he opens the chest again, he will be added to the List again, closing does not remove him.

This causes some problems: The List will grow indefinitely, Plugins can't keep track of who has an inventory opened, Also when sneaking and opening a chest, it will stay visually open forever.

inv viewers

Jikoo commented 4 years ago

Ah, Craftbukkit's inventory tracking implementation isn't being updated properly because the inventory has already been changed. Just to be on the safe side we'll also remove from the listing on Mojang's side too, though that's clearly the CB side - Mojang uses a Set.