Class PlayerElytraBoostEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerElytraBoostEvent
All Implemented Interfaces:
Cancellable

public class PlayerElytraBoostEvent extends PlayerEvent implements Cancellable
Fired when a player boosts elytra flight with a firework
  • Constructor Details

  • Method Details

    • getItemStack

      @NotNull public @NotNull ItemStack getItemStack()
      Get the firework itemstack used
      Returns:
      ItemStack of firework
    • getFirework

      @NotNull public @NotNull Firework getFirework()
      Get the firework entity that was spawned
      Returns:
      Firework entity
    • shouldConsume

      public boolean shouldConsume()
      Get whether to consume the firework or not
      Returns:
      true to consume
    • setShouldConsume

      public void setShouldConsume(boolean consume)
      Set whether to consume the firework or not
      Parameters:
      consume - true to consume
    • getHand

      @NotNull public @NotNull EquipmentSlot getHand()
      Gets the hand holding the firework used for boosting this player.
      Returns:
      interaction hand
    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Cancellable
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if this event is cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Description copied from interface: Cancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()