How to pickup Skeleton Arrow

Discussion in 'Plugin Development' started by lucasdidur, Aug 8, 2012.

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

    lucasdidur

    Hello,

    How I can pickup Skeleton Arrow

    I tried to use this, but in 1.3.1 not work anymore.


    PHP:
     
        
    @EventHandler(priority EventPriority.NORMAL)
        public 
    void onProjectileHit(ProjectileHitEvent event) {
            
    Entity entity event.getEntity();
            if (!(
    entity instanceof Arrow)) {
                return;
            }
     
            
    Arrow arrow = (Arrow)entity;
     
            ((
    CraftArrow)arrow).getHandle().fromPlayer true;
        }
     

    Error at: ((CraftArrow)arrow).getHandle()
     
  2. Offline

    Malikk

    You could try messing around with CraftArrow.setShooter(). If that doesn't work you might have to use the native code, that's how I did it for 1.3.1, but I already had reflection setup for that, it's not the most convenient thing.
     
Thread Status:
Not open for further replies.

Share This Page