Fast bow?

Discussion in 'Plugin Development' started by spurkle, Nov 17, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    spurkle

    Hi, how can i make a bow to shoot very fast for a couple of seconds? Like a machine gun. (If player kills someone the kill event should point the kill to the player)

    thx.
     
  2. Offline

    Fuzzybear04

    int mul = 2;

    PlayerInteractEvent
    Check for Right Click
    Arrow a = p.getWorld().spawn(p.getEyeLocation(), Arrow.class);
    a.setShooter();
    a.setVelocity(p.getLocation().getDirection().multiply(mul));
     
  3. Offline

    Googlelover1234

  4. Offline

    Th3Br1x

    Googlelover1234
    Well, but i think that spawning Entities is a thing, thats not that easy for beginners.
    And Fuzzybear04 cut his code, so i think thats okay.

    spurkle If you want it to shoot multiple arrows at a time, you may want to use a for-loop. And to make it shoot for a period of time, you want want to use Bukkit's Runnables with a delayed task. There should be some stuff about that task-stuff in the bukkit wiki :)
     
Thread Status:
Not open for further replies.

Share This Page