Class GlowFirework

All Implemented Interfaces:
Summonable, 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.Firework, org.bukkit.entity.Projectile, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class GlowFirework extends GlowEntity implements org.bukkit.entity.Firework, Summonable
  • Constructor Details

    • GlowFirework

      public GlowFirework(org.bukkit.Location location)
    • GlowFirework

      public GlowFirework(org.bukkit.Location location, UUID spawningEntity, org.bukkit.entity.LivingEntity boostedEntity, org.bukkit.inventory.ItemStack item)
      Creates an instance.
      location - the location
      spawningEntity - TODO: document this parameter
      boostedEntity - TODO: document this parameter
      item - the firework rocket as an item
  • Method Details

    • getType

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

      public List<> 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
      A list of messages which can spawn this entity.
    • getFireworkMeta

      public org.bukkit.inventory.meta.FireworkMeta getFireworkMeta()
      Specified by:
      getFireworkMeta in interface org.bukkit.entity.Firework
    • setFireworkMeta

      public void setFireworkMeta(org.bukkit.inventory.meta.FireworkMeta fireworkMeta)
      Specified by:
      setFireworkMeta in interface org.bukkit.entity.Firework
    • getFireworkItem

      public org.bukkit.inventory.ItemStack getFireworkItem()
      Get the underlying firework item.
      The Firework ItemStack of this Firework entity, or a new Firework ItemStack
    • setFireworkItem

      public void setFireworkItem(org.bukkit.inventory.ItemStack item)
      Set the firework item of this firework entity. If an empty ItemStack, or none of the type {Material.FIREWORK_ROCKET} was given, a new Firework ItemStack will be created.
      item - FireWork Item this entity should use
    • detonate

      public void detonate()
      Specified by:
      detonate in interface org.bukkit.entity.Firework
    • 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.
      pulse in class GlowEntity
    • pulsePhysics

      protected void pulsePhysics()
      pulsePhysics in class GlowEntity
    • getShooter

      @Nullable public @Nullable org.bukkit.projectiles.ProjectileSource getShooter()
      Specified by:
      getShooter in interface org.bukkit.entity.Projectile
    • setShooter

      public void setShooter(@Nullable @Nullable org.bukkit.projectiles.ProjectileSource shooter)
      Specified by:
      setShooter in interface org.bukkit.entity.Projectile
    • doesBounce

      public boolean doesBounce()
      Specified by:
      doesBounce in interface org.bukkit.entity.Projectile
    • setBounce

      public void setBounce(boolean b)
      Specified by:
      setBounce in interface org.bukkit.entity.Projectile
    • getSpawningEntity

      public UUID getSpawningEntity()
      Specified by:
      getSpawningEntity in interface org.bukkit.entity.Firework
    • setSpawningEntity

      public void setSpawningEntity(UUID spawningEntity)
    • getBoostedEntity

      public org.bukkit.entity.LivingEntity getBoostedEntity()
      Specified by:
      getBoostedEntity in interface org.bukkit.entity.Firework
    • isShotAtAngle

      public boolean isShotAtAngle()
      Specified by:
      isShotAtAngle in interface org.bukkit.entity.Firework
    • setShotAtAngle

      public void setShotAtAngle(boolean shotAtAngle)
      Specified by:
      setShotAtAngle in interface org.bukkit.entity.Firework
    • getLifeTime

      public int getLifeTime()
      The number of ticks before this fireworks rocket explodes.
    • setLifeTime

      public void setLifeTime(int lifeTime)
      The number of ticks before this fireworks rocket explodes.