Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // p is the player
- // First example using launchProjectile
- // Result: Explodes at player location
- p.launchProjectile(SmallFireball.class);
- // Second example using world-spawn
- // Result: flickers for a second, then disappears until it hit something
- final Vector direction = p.getEyeLocation().getDirection().multiply(1);
- final SmallFireball fireball = p.getWorld().spawn(p.getEyeLocation().add(direction.getX(), direction.getY(), direction.getZ()), SmallFireball.class);
- fireball.setShooter(p);
Advertisement
Add Comment
Please, Sign In to add comment