Skip to content

Commit

Permalink
bukkit: Player#eject passengers before teleporting
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Oct 20, 2023
1 parent d951223 commit 34fefaf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public void teleportLocally(@NotNull Location location, boolean async) throws Te
plugin.getScheduler().entitySpecificScheduler(player).run(
() -> {
player.leaveVehicle();
player.eject();
if (async || plugin.getScheduler().isUsingFolia()) {
PaperLib.teleportAsync(player, bukkitLocation, PlayerTeleportEvent.TeleportCause.PLUGIN);
return;
Expand Down

0 comments on commit 34fefaf

Please sign in to comment.