Enum Class TNTPrimeEvent.PrimeCause

All Implemented Interfaces:
Serializable, Comparable<TNTPrimeEvent.PrimeCause>, Constable
Enclosing class:

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.

      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.

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

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

      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.


      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.
      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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null