Ensure player is dismounted before teleport, fix #496

This commit is contained in:
William278 committed 2023-09-25 13:23:53 +01:00
1 parent e579b2b05e
commit 2145d6925f
3 files changed
+3

No files matched your search

@@ -136,6 +136,7 @@ public class BukkitUser extends OnlineUser {
// Run on the appropriate thread scheduler for this platform
plugin.getScheduler().entitySpecificScheduler(player).run(
() -> {
player.leaveVehicle();
if (async || plugin.getScheduler().isUsingFolia()) {
PaperLib.teleportAsync(player, bukkitLocation, PlayerTeleportEvent.TeleportCause.PLUGIN);
return;