TemporaryMinecarts don't despawn on disconnect
xNccPlay opened this issue ยท 2 comments
Versions
CraftBook version: 3.10.1
Bukkit version: git-Paper-213
Describe the bug
With TemporaryCarts enabled, it is possible, that players can enter a minecart, by rightclicking a track with a free hand. When leaving the minecart, it is despawning correctly, so everthing is fine here.
But if a player disconnects, the minecart remains on the track, what in normal circumstances is no problem. But in our case, we have the problem, that if a player has build permission on that track, he could disconnect, reconnect and is then able to break the minecart. It is possible to redo this unlimited times and on our economy system, that has an huge impact.
It would be very nice, if the minecart is also removed on disconnect, not only while leaving the minecart.
To Reproduce
- Get a piece of track
- rightclick the track with no item in hand
- when you are in the temporary minecart, disconnect
- reconnect and leave the minecart
- mine the minecart
greetings,
xNccPlay
Spigot used to call the dismount event when a player disconnected while in a Minecart. This allowed the mechanic to move the cart.
Due to Spigot firing the player's disconnection event after the player has exited the cart, there's no way to get the cart that they were inside of before they disconnected.
This is basically a Spigot issue.