Solved Block damaged by an Explosion

Discussion in 'Plugin Development' started by Plx0wn, Oct 9, 2016.

Thread Status:
Not open for further replies.
  1. Hi! I wan't disable the damage make by an explosion created by my plugin! Wich event i need? Thank's for your help!
     
  2. Offline

    XxTimexX

    @Plx0wn
    Damage to the player or damage to the enviornment?

    For player damage you can check if the cause of damage was explosion and set that damage to 0 (using EntityDamageEvent or was it PlayerDamageEvent? Didn't use Bukkit for quite some time).

    For enviormental damage it all depends on what is the cause of explosion.
     
  3. @XxTimexX
    The explosion are created with :
    Code:
    world.createExplosion(grenade.getLocation(), 3.0F);
    And i want disable environemental damage and playerx damage
     
  4. Offline

    I Al Istannen

    @Plx0wn
    Consider just sending the particles then.

    Or use this method, which should prevent block damage (if you pass false for breakBlocks).
     
  5. Offline

    I Al Istannen

    @Plx0wn
    No problem :)

    Glad I could help ;)
     
Thread Status:
Not open for further replies.

Share This Page