mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-01 14:51:39 +01:00
Fixed EnderPearls not being limited to the world they were used in. Fixes BUKKIT-658
This commit is contained in:
parent
8ecdfe9eed
commit
f26fbc3bf3
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||||
if (this.shooter != null) {
|
if (this.shooter != null) {
|
||||||
if (this.shooter instanceof EntityPlayer) {
|
if (this.shooter instanceof EntityPlayer) {
|
||||||
CraftPlayer player = (CraftPlayer) this.shooter.bukkitEntity;
|
CraftPlayer player = (CraftPlayer) this.shooter.bukkitEntity;
|
||||||
teleport = player.isOnline();
|
teleport = player.isOnline() && player.getWorld() == getBukkitEntity().getWorld();
|
||||||
|
|
||||||
if (teleport) {
|
if (teleport) {
|
||||||
teleEvent = new PlayerTeleportEvent(player, player.getLocation(), getBukkitEntity().getLocation(), PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
|
teleEvent = new PlayerTeleportEvent(player, player.getLocation(), getBukkitEntity().getLocation(), PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue