Bukkit/CraftBukkit — pull request #1161 by bendude56 (2013-05-18 02:59:32+00:00)
Title: [C] Allow teleportation of players in vehicles. Fixes BUKKIT-4210.

#### The Issue

When Minecraft 1.5 was released, teleportation code in the vanilla Minecraft server was changed so that any players on vehicles are dismounted before being teleported. Currently, the CraftBukkit code simply disallows teleportation when players are in vehicles.

#### Justification for PR

The behavior that CraftBukkit exhibits when teleporting players while in vehicles is different than the behavior of a vanilla Minecraft server under the same conditions. Any plugins which teleport players without first making sure they are dismounted may have their teleports unexpectedly fail.

#### PR Breakdown

This commit causes `CraftPlayer.teleport(Location, TeleportCause)` to not return false if the player is in a vehicle, and causes the player to be dismounted before being teleported, if the event is not cancelled.

#### Testing Results and Materials

Testing was done by using the built-in /tp command to teleport between players, with one player in a boat when being teleported. In addition, teleportation with both players as normal was tested.

#### JIRA Ticket

BUKKIT-4210 - https://bukkit.atlassian.net/browse/BUKKIT-4210