I got the following code: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: Entity egg = player.getWorld().spawnEntity(player.getLocation().add(player.getLocation().getDirection()), EntityType.EGG) egg.setVelocity(player.getLocation().getDirection()) There is just one problem: I had to add (player.getLocation().getDirection()) to the spawn location cause otherwise the egg would spawn inside of the player and instantly break. Now it breaks if the code is executed when the player look higher than -51.1. How may I fix this? Second: When I spawn this egg its a lot lower than a normal one. How to get it up? (I'm to dump) Fixed both. Had to add (0, 1.5, 0) Edit: now you hit yourself if you throw downwards...
Egg egg = player.launchProjectile(Egg.class) egg.setVelocity(player.getLocation().getDirection().multiply(1.6));