Players who are riding something are now (unfortunately) ejected when knocked back from the border. This was necessary due to the Bukkit team removing the ability to teleport entities which have a passenger or are the passenger of another entity.

Note that I tried to work around it by ejecting the player, teleporting the entity they were riding (minecart, pig, whatever), and then setting the player as passenger again, but it was bugged and only halfway treating the player as if they were riding something.
This commit is contained in:
Brettflan 2013-03-29 21:48:12 -05:00
parent f6388102f9
commit 1c950228d7
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,7 @@ public class BorderCheckTask implements Runnable
player.teleport(newLoc);
else
{
/* // Bukkit team have removed the ability to teleport any entity which has a passenger, causing this to fail horribly now, so...
Entity ride = player.getVehicle();
if (ride != null)
{ // vehicles need to be offset vertically and have velocity stopped
@ -88,6 +89,9 @@ public class BorderCheckTask implements Runnable
player.leaveVehicle();
player.teleport(newLoc);
}
*/ // so unfortunately until they become sane again we must always eject player from whatever they're riding
player.leaveVehicle();
player.teleport(newLoc);
}
return null;