Class GlowFirework

java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.passive.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.
      Parameters:
      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
      Overrides:
      getType 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.
    • 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.
      Returns:
      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.
      Parameters:
      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.
      Overrides:
      pulse in class GlowEntity
    • pulsePhysics

      protected void pulsePhysics()
      Overrides:
      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.