Solved Get block type an egg hatched on.

Discussion in 'Plugin Development' started by CaptainBern, Jun 27, 2013.

Thread Status:
Not open for further replies.
  1. Hello community,
    I'm currently making a Wasted plugin (the core features are added: custom guns, ammo, shooting, reloading, listeners, events...) But now I have a problem. For the hit stuff I'm checking the EggHatchEvent but I can't seem to get the block an egg hatched on to create the particle effect. Like when you shoot at a stone wall and you see stone particles. (Note: I Do know how to create particles/spawn them so don't start posting things like: here is some random code to teach you something you already know...) Does someone know how to get the block?
     
  2. Offline

    RealDope

    Maybe also listen to ProjectileHitEvent and get the location from that?
     
    CaptainBern likes this.
  3. Already tried, the block it returned was air...
     
  4. Offline

    RealDope

    Block.getWorld().getBlockAt(Block.getLocation().add(0, -1, 0));
     
    CaptainBern likes this.
  5. Yes but what if you shoot at a wall? I can also just check if the block != air, then get the block in front and so go on...
    I guess I will do it that way then...
    Thanks for your help.
     
Thread Status:
Not open for further replies.

Share This Page