mirror of
https://github.com/Brettflan/WorldBorder.git
synced 2025-02-23 15:01:23 +01:00
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:
parent
f6388102f9
commit
1c950228d7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user