SnowBall Frag Grenades

Discussion in 'Resources' started by jonneystechcheck, Jul 25, 2012.

Thread Status:
Not open for further replies.
  1. This is a little piece of code which creates a so called frag grenade. It drops down a tnt primed and kills any player inside a configured amount of blocks. It will not destroy blocks either. So enjoy. The time for the tnt to explode is 2 seconds you can just change the tnt.setFuseTicks() to whatever you want. You might want to add some permissions, or use a command storing the person in a arraylist or hashmap.

     
    d0de likes this.
  2. Offline

    CarPet

    No matter where they are they are effected by the explosion...
     
  3. Offline

    Vandrake

    player.getWorld.createExplosion means anything to you? :confused: Dear lord....
     
  4. Offline

    Icyene

    Why exactly are you threading the damaging? Seems like accidental complexity to a trivial task...
     
  5. Offline

    CarPet

    How would you just remove a certain amount of health? LIke 2 hearts instead of killing them?
     
  6. Offline

    Vandrake

    dead.setHealth(4); for 2 hearts damage
     
  7. Offline

    CarPet

    No not setting their health to 2 hearts, taking away 2 hearts?
     
  8. Offline

    Vandrake

    ye you're right xD sorry just woke up. its dead.damage(4) not set health
     
Thread Status:
Not open for further replies.

Share This Page