Question Picking Up Arrows

Discussion in 'Plugin Help/Development/Requests' started by 2008Choco, Jun 21, 2015.

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

    2008Choco

    When you shoot an arrow, it will get stuck in the ground. I'm trying to remove the arrow being picked up from an arraylist once the arrow is picked up. I'm really confused on how to do this though because when an arrow is on the ground, it's no longer an item, it's still an Entity. Is there an event that fires when you try and pick up the arrow? Or do I just use PlayerPickupItemEvent?

    If I do use PlayerPickupItemEvent, how would I use it to fire when an arrow is picked up
     
  2. Offline

    BizarrePlatinum

    @2008Choco PlayerPickupItemEvent should fire when the arrows are picked up. Try testing if the item being picked up is an arrow. Then you may also want to test if the arrow is in the array list before trying to remove it (event will fire if the player is picking up the actual item as well).
     
    2008Choco likes this.
  3. Offline

    2008Choco

    @BizarrePlatinum It felt strange attempting to use PlayerPickupItemEvent on an object that isn't an item. Lol thanks anyways :D I'll try it out and let ya know if I need more help
     
Thread Status:
Not open for further replies.

Share This Page