Enum Class TNTPrimeEvent.PrimeCause

java.lang.Object
java.lang.Enum<TNTPrimeEvent.PrimeCause>
org.bukkit.event.block.TNTPrimeEvent.PrimeCause
All Implemented Interfaces:
Serializable, Comparable<TNTPrimeEvent.PrimeCause>, Constable
Enclosing class:
TNTPrimeEvent

public static enum TNTPrimeEvent.PrimeCause extends Enum<TNTPrimeEvent.PrimeCause>
An enum to represent the cause of a TNT block becoming primed.
  • Enum Constant Details

    • FIRE

      public static final TNTPrimeEvent.PrimeCause FIRE
      When TNT is primed by fire spreading.
    • REDSTONE

      public static final TNTPrimeEvent.PrimeCause REDSTONE
      When TNT is primed by a redstone signal.
    • PLAYER

      public static final TNTPrimeEvent.PrimeCause PLAYER
      When TNT is primed by a player interacting with it directly.
    • EXPLOSION

      public static final TNTPrimeEvent.PrimeCause EXPLOSION
      When TNT is primed by a nearby explosion.
    • PROJECTILE

      public static final TNTPrimeEvent.PrimeCause PROJECTILE
      When TNT is primed after getting hit with a burning projectile.
    • BLOCK_BREAK

      public static final TNTPrimeEvent.PrimeCause BLOCK_BREAK
      When TNT with the unstable block state set to true is broken.

      Note: Canceling a prime event with this cause will stop the primed TNT from spawning but will not stop the block from being broken.

    • DISPENSER

      public static final TNTPrimeEvent.PrimeCause DISPENSER
      When TNT is primed by a dispenser holding flint and steel.

      Note: This event is not called for a dispenser dispensing TNT directly.

  • Method Details

    • values

      public static TNTPrimeEvent.PrimeCause[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TNTPrimeEvent.PrimeCause valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null