DrexHD / Vanish

Fabric vanish mod to completely hide from other players using /vanish
MIT License
19 stars 9 forks source link

Fix containers remaining open by vanished player in certain conditions #42

Closed XXMA16 closed 2 weeks ago

XXMA16 commented 2 weeks ago

Non-shulkerbox containers call ContainerOpenersCounter#recheckOpeners, which wasn't accounted for. This means that a Chest (any kind) or a Barrel that was at some point accessed by both visible and invisible players at the same time will remain open until every player, including the vanished ones, closes its GUI.

I'm not sure whether I should also test if the player is a ServerPlayer in the newly added mixin.

DrexHD commented 2 weeks ago

Thanks for the PR, didn't even look into implementing this, because spectator has the same bug lol Checking for ServerPlayer is not neccessary. isVanished will just return false for any non server player