From 6feacf7b824f3e918608d7cc6bf862b053a982d8 Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Sat, 1 Feb 2020 23:09:04 +0100 Subject: [PATCH] bugfixes --- src/de/steamwar/lobby/listener/EnderPearlListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/lobby/listener/EnderPearlListener.java b/src/de/steamwar/lobby/listener/EnderPearlListener.java index aa5022d..55bd93e 100644 --- a/src/de/steamwar/lobby/listener/EnderPearlListener.java +++ b/src/de/steamwar/lobby/listener/EnderPearlListener.java @@ -14,6 +14,7 @@ import org.bukkit.event.entity.ProjectileHitEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.vehicle.VehicleExitEvent; +import org.bukkit.util.Vector; public class EnderPearlListener implements Listener { @@ -72,7 +73,7 @@ public class EnderPearlListener implements Listener { return; Player player = ((Player) projectile.getShooter()).getPlayer(); - player.teleport(event.getEntity().getVelocity().subtract(event.getHitBlock().getLocation().toVector()).toLocation(player.getWorld())); + player.setVelocity(player.getLocation().toVector()); }