Shooting a arrow like it has infinite on it(aka others cant pick it up)

Discussion in 'Plugin Development' started by welsar55, Jan 2, 2014.

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

    welsar55

    So I start by shooting a arrow like so
    Code:java
    1. Arrow arrow = player.launchProjectile(Arrow.class);

    but then how do I put enchantments on the arrow? I will work with nms if needed.
     
  2. Offline

    Gater12

    You can assign a meta data to the arrow. Then listen for PlayerPickupItemEvent and test if it's an arrow and has the meta data you assigned then cancel the event.
     
  3. Offline

    RawCode

    public void setShooter(LivingEntity shooter);

    set shooter to null after arrow is created
     
Thread Status:
Not open for further replies.

Share This Page