Archiviert
13
0
Dieser Commit ist enthalten in:
Yaruma3341 2020-02-01 23:09:04 +01:00
Ursprung ab10a7a4bc
Commit 6feacf7b82

Datei anzeigen

@ -14,6 +14,7 @@ import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.vehicle.VehicleExitEvent; import org.bukkit.event.vehicle.VehicleExitEvent;
import org.bukkit.util.Vector;
public class EnderPearlListener implements Listener { public class EnderPearlListener implements Listener {
@ -72,7 +73,7 @@ public class EnderPearlListener implements Listener {
return; return;
Player player = ((Player) projectile.getShooter()).getPlayer(); Player player = ((Player) projectile.getShooter()).getPlayer();
player.teleport(event.getEntity().getVelocity().subtract(event.getHitBlock().getLocation().toVector()).toLocation(player.getWorld())); player.setVelocity(player.getLocation().toVector());
} }