Players not getting removed from InventoryViewers #115

Closed
opened 2019-12-03 11:23:03 -05:00 by Sn0wStorm · 1 comment
Sn0wStorm commented 2019-12-03 11:23:03 -05:00 (Migrated from github.com)

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

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](https://user-images.githubusercontent.com/4077108/70068814-fbdb2980-15f0-11ea-8df4-f14e1544e069.png)
Jikoo commented 2019-12-03 13:30:02 -05:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/OpenInv#115
No description provided.