mirror of
https://github.com/PaperMC/Folia.git
synced 2025-04-21 11:49:20 +08:00
Some plugins are bad and update the `from` position to something completely garbage. To avoid a crash from this cross-region teleportation, the teleportAsync function is now used. The reason the teleport isn't simply ignored is since there may be legitimate reasons to update the `from` position to something off-region. This also handles the case where the plugin _uses_ an asynchronous teleport while cancelling the event. This mirrors the behavior for changing the target destination but not cancelling the event. Fixes https://github.com/PaperMC/Folia/issues/115