Package net.glowstone

Class Explosion

java.lang.Object
net.glowstone.Explosion

public final class Explosion extends Object
  • Field Details

  • Constructor Details

    • Explosion

      public Explosion(org.bukkit.entity.Entity source, GlowWorld world, double x, double y, double z, float power, boolean incendiary, boolean breakBlocks)
      Creates a new explosion.
      Parameters:
      source - The entity causing this explosion
      world - The world this explosion is in
      x - The X location of the explosion
      y - The Y location of the explosion
      z - The Z location of the explosion
      power - The power of the explosion
      incendiary - Whether or not blocks should be set on fire
      breakBlocks - Whether blocks should break through this explosion
    • Explosion

      public Explosion(@Nullable org.bukkit.entity.Entity source, org.bukkit.Location location, float power, boolean incendiary, boolean breakBlocks)
      Creates a new explosion.
      Parameters:
      source - The entity causing this explosion
      location - The location this explosion is occuring at. Must be in a GlowWorld.
      power - The power of the explosion
      incendiary - Whether or not blocks should be set on fire
      breakBlocks - Whether blocks should break through this explosion
  • Method Details

    • explodeWithEvent

      public boolean explodeWithEvent()
      Explodes, firing a EntityExplodeEvent, as long as its power is non-negligible.
      Returns:
      false if the explosion was canceled by a plugin; true otherwise