Closed OoLunar closed 2 years ago
Here's a repro. It seems like this is only caused through right-clicking though, not through the /sit
command.
Should be resolved as of 4b86f4355ec390cc3f01a3eaac48180bd7b57891 I'll release version 1.5.3 in a sec, let me know how it goes :)
Works as intended! Thank you for the quick fix.
Description
Attempting to sit in the same block multiple times- as in sitting, shifting to leave, then sitting again -will lead to the incorrect error of "Someone is already sitting here!" when nobody is sitting there. Presumably, this is caused by the Shift event not actually removing the player from that pose in memory.
Solution
The simplest solution to fixing the bug is removing the player's pose on that XYZ block from how you store it in memory. Though, what I believe to be the correct solution to this issue is to have a dictionary/hashmap of the player's GUID and the XYZ position they're in. This way, the player can only be in one pose at a time preventing "ghost poses" of what we're experiencing now.
Notes
Possibly caused by #8? Depending on the complexity of your mod, I might submit an untested PR.