Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void shoot(Player player){
- final Location loc = player.getEyeLocation();
- new BukkitRunnable() {
- Vector dir = loc.getDirection().normalize();
- double t = 0;
- @Override
- public void run() {
- t += 1;
- double x = t*dir.getX();
- double y = t*dir.getY();
- double z = t*dir.getZ();
- loc.add(x, y, z);
- ParticleEffect.LAVA.display(0, 0, 0, 0, 5, loc, 10000000);
- loc.subtract(x, y, z);
- if(t > 100){
- this.cancel();
- }
- }
- }.runTaskTimer(pl, 0, 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment