Solved How to make Arrows dissapear when they hit the ground

Discussion in 'Plugin Development' started by WingedMLGPro, Apr 21, 2015.

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

    WingedMLGPro

    Hey Guys!
    How would i go about making arrows dissapear when they hit the ground?
    I have no idea how to do this so plz help me out!
    Thanks,
    WingedMLGPro
     
  2. Offline

    Zombie_Striker

    if(entity.isOnGround()) entity.remove();
     
    CodePlaysMinecraft likes this.
  3. Offline

    e1kfws7

    Code:
    @EventHandler
        public void onProjectileHit(final ProjectileHitEvent ev) {
            final Entity entity = ev.getEntity();
            if (entity.getType() == EntityType.ARROW && (entity.isOnGround())) {
                entity.remove();
            }
        }
     
    Phazerous likes this.
  4. Offline

    WingedMLGPro

  5. Offline

    RuthlessRage

    @WingedMLGPro but what if it hits a wall, then just get the facing direction and set the block next to the block the arrow hit according to the facing direction as air and it will remove it, I use it in my minigames
     
Thread Status:
Not open for further replies.

Share This Page