Class FireworkMock

java.lang.Object
org.bukkit.command.CommandSender.Spigot
All Implemented Interfaces:
MessageTarget, net.kyori.adventure.audience.Audience, net.kyori.adventure.pointer.Pointered, net.kyori.adventure.sound.Sound.Emitter, 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 FireworkMock extends ProjectileMock implements org.bukkit.entity.Firework
Mock implementation of a Firework.
See Also:
  • Constructor Details

    • FireworkMock

      public FireworkMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid)
      Constructs a new FireworkMock on the provided ServerMock with a specified UUID.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
    • FireworkMock

      public FireworkMock(@NotNull @NotNull ServerMock server, @NotNull @NotNull UUID uuid, @NotNull @NotNull org.bukkit.inventory.meta.FireworkMeta meta)
      Constructs a new FireworkMock on the provided ServerMock with a specified UUID and FireworkMeta.
      Parameters:
      server - The server to create the entity on.
      uuid - The UUID of the entity.
      meta - The FireworkMeta to apply.
  • Method Details

    • getType

      @NotNull public @NotNull org.bukkit.entity.EntityType getType()
      Specified by:
      getType in interface org.bukkit.entity.Entity
      Overrides:
      getType in class EntityMock
    • getFireworkMeta

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

      public void setFireworkMeta(@NotNull @NotNull org.bukkit.inventory.meta.FireworkMeta meta)
      Specified by:
      setFireworkMeta in interface org.bukkit.entity.Firework
    • setAttachedTo

      public boolean setAttachedTo(@Nullable @Nullable org.bukkit.entity.LivingEntity entity)
      Specified by:
      setAttachedTo in interface org.bukkit.entity.Firework
    • getAttachedTo

      @Nullable public @Nullable org.bukkit.entity.LivingEntity getAttachedTo()
      Specified by:
      getAttachedTo in interface org.bukkit.entity.Firework
    • setLife

      @Deprecated(forRemoval=true) public boolean setLife(int ticks)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setLife in interface org.bukkit.entity.Firework
    • getLife

      @Deprecated(forRemoval=true) public int getLife()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getLife in interface org.bukkit.entity.Firework
    • setMaxLife

      @Deprecated(forRemoval=true) public boolean setMaxLife(int ticks)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setMaxLife in interface org.bukkit.entity.Firework
    • getMaxLife

      @Deprecated(forRemoval=true) public int getMaxLife()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getMaxLife in interface org.bukkit.entity.Firework
    • detonate

      public void detonate()
      Specified by:
      detonate in interface org.bukkit.entity.Firework
    • isDetonated

      public boolean isDetonated()
      Specified by:
      isDetonated 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
    • getSpawningEntity

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

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

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getItem()
      Specified by:
      getItem in interface org.bukkit.entity.Firework
    • setItem

      public void setItem(@Nullable @Nullable org.bukkit.inventory.ItemStack itemStack)
      Specified by:
      setItem in interface org.bukkit.entity.Firework
    • getTicksFlown

      public int getTicksFlown()
      Specified by:
      getTicksFlown in interface org.bukkit.entity.Firework
    • setTicksFlown

      public void setTicksFlown(int ticks)
      Specified by:
      setTicksFlown in interface org.bukkit.entity.Firework
    • getTicksToDetonate

      public int getTicksToDetonate()
      Specified by:
      getTicksToDetonate in interface org.bukkit.entity.Firework
    • setTicksToDetonate

      public void setTicksToDetonate(int ticks)
      Specified by:
      setTicksToDetonate in interface org.bukkit.entity.Firework