Location where arrow landed.

Discussion in 'Spigot Help' started by Vylerion, Apr 23, 2017.

  1. Hi,

    So I tried out a few things, using nms to hook into EntityArrow kinda works. But to understand how to fix it you need to understand what I am doing:
    I am making an minigame that has the same effect like an enderdragon, you can shoot with (only) a bow to destroy 'regen pillars' of the dragon, which are beacons. Now I used the nms wich hooks into EntityArrow to get the XYZ at projectilehitevent, but after checking if the shooter (an player which i already checked) is in one of the 2 teams, it stops working. Can somene help me?
     
  2. ProjectileHitEvent is what you can use when an arrow lands or hits something.
     
  3. I know, thats what i am trying to achieve.. get the block of the arrow.
     
  4. You can use getLocation() afaik. To get the location where it landed. Then you can use getBlockX() etc.
     
  5. Thats what i tried, i googled this already and i came to the conclusion that it is impossible without nms. So i toke this code: https://github.com/stevenpcc/ArrowH.../gmail/stevenpcc/arrowhitblockevent/Main.java and update it to my minecraft version. It works perfectly but when i check if the block is the good type it does nothing. (while the type is correct)
     
  6. Can you post the code? This gives us more information :)
     
  7. Sure, let me start intellij