Class GlowTntPrimed

All Implemented Interfaces:
net.kyori.adventure.audience.Audience, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, org.bukkit.command.CommandSender, org.bukkit.entity.Entity, org.bukkit.entity.Explosive, org.bukkit.entity.TNTPrimed, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class GlowTntPrimed extends GlowExplosive implements org.bukkit.entity.TNTPrimed
  • Constructor Details

    • GlowTntPrimed

      public GlowTntPrimed(org.bukkit.Location location)
      Creates a primed TNT block, not associated with any igniting entity.
      Parameters:
      location - the location
    • GlowTntPrimed

      public GlowTntPrimed(org.bukkit.Location location, org.bukkit.entity.Entity source)
      Creates a primed TNT block.
      Parameters:
      location - the location
      source - the entity that ignited this; may be null
  • Method Details

    • getPlayer

      public GlowPlayer getPlayer()
      Get the player that ignited the TNT.
      Returns:
      Player that ignited the TNT
    • setIgnitedByExplosion

      public void setIgnitedByExplosion(boolean ignitedByExplosion)
      Sets whether this TNT was ignited by an explosion or not. This is not tracked, but affects the fuse length.
      Parameters:
      ignitedByExplosion - whether this TNT was ignited by an explosion
    • pulse

      public void pulse()
      Description copied from class: GlowEntity
      Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.
      Overrides:
      pulse in class GlowEntity
    • createSpawnMessage

      public List<com.flowpowered.network.Message> createSpawnMessage()
      Description copied from class: GlowEntity
      Creates a list of Messages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.
      Specified by:
      createSpawnMessage in class GlowEntity
      Returns:
      A list of messages which can spawn this entity.
    • getSource

      public final org.bukkit.entity.Entity getSource()
      Specified by:
      getSource in interface org.bukkit.entity.TNTPrimed
    • getType

      public final org.bukkit.entity.EntityType getType()
      Specified by:
      getType in interface org.bukkit.entity.Entity
      Overrides:
      getType in class GlowEntity
    • getFuseTicks

      public int getFuseTicks()
      Specified by:
      getFuseTicks in interface org.bukkit.entity.TNTPrimed
    • setFuseTicks

      public void setFuseTicks(int fuseTicks)
      Specified by:
      setFuseTicks in interface org.bukkit.entity.TNTPrimed
    • setSource

      public void setSource(org.bukkit.entity.Entity source)
      Specified by:
      setSource in interface org.bukkit.entity.TNTPrimed