PurpurMC / Purpur

Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
https://purpurmc.org
MIT License
2.05k stars 362 forks source link

Fire EntityTeleportHinderedEvent when attempting to teleport a player with passengers #1563

Closed Villagers654 closed 4 months ago

Villagers654 commented 4 months ago

Fires EntityTeleportHinderedEvent when a player has passengers before preventing the teleport from continuing, restoring the functionality of this event prior to 1.21, so that plugins can mount passengers to players without breaking Player#teleport

This is my first time ever using this patch system... I think I did it correctly as it was a very minor change (it certainly works when I tested!) but if I did something wrong and/or stupid feel free to let me know lol