Bukkit.createExplosion(); Stopping blocks blowing up.

Discussion in 'Plugin Development' started by feff890, Aug 7, 2015.

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


    Ok so here's my question:
    How can I make an explosion that doesn't hurt anyone or do any damage? I just need the velocity part of it.
    Future thanks!
  2. Look at EntityExplodeEvent and EntityDamageByEntityEvent
  3. Offline


    p.getWorld().createExplosion(<location>, null);
    like this?
  4. Offline


    Oh sorry. I don't think I was very specific. I need to make an explosion using:
  5. Offline


    Just play the explosion effect instead of making an actual explosion?
  6. Offline


    But he wants the velocity with it.

    You could just check if the player was last damaged by an explosion and if it was just replenish the health back and for your block problem: Make a list of all the blocks that were destroyed by tnt explosions and after like 2 ticks restore all the blocks from the list back to it's original location.
    feff890 likes this.
  7. Offline


Thread Status:
Not open for further replies.

Share This Page