zly2006 / Enclosure

A server-side minecraft mod that allows players to protect their homes.
https://enclosure.fandom.com/wiki/Enclosure_Wiki
Other
16 stars 6 forks source link

fix: respawnPlayer() will cause the player fall into an abnormal state #33

Closed sakurawald closed 1 year ago

sakurawald commented 1 year ago

To reproduce: create a residence in void, and set global 'move' to false. Then let the PlayerManager#respawnPlayer() be called.

PlayerManager#respawnPlayer() will cause the player to fall into an abnormal state, which means that the player's real position is still no change, and the player can't break any blocks. (And then the player will be kicked because of "Flying too long", and then the player can't even join the server anymore.

To stop the abuse of PlayerManager#respawnPlayer(), and change the default solution to teleport the player to the spawn of the overworld. (This may not be the best solution, maybe a config option to set where to teleport ?)

zly2006 commented 1 year ago

maybe you should merge upstream first and then commit your changes

then do a force push, so commit history can be shorter and clearer

sakurawald commented 1 year ago

maybe you should merge upstream first and then commit your changes

then do a force push, so commit history can be shorter and clearer

It's done