Class GliderDeployEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.glider.GliderDeployEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public final class GliderDeployEvent extends ZentrixEvent implements org.bukkit.event.Cancellable
Called before a player starts gliding: leaving the dragon bus, landing from a sky drop, or through GliderService#deploy.

Cancelling leaves the player falling without a glider, so a listener that cancels is responsible for getting them down safely - for instance by deploying its own descent.

Main thread; only fired while a listener is registered.

Since:
1.8.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    GliderDeployEvent(@NotNull org.bukkit.entity.Player player, @Nullable String gliderId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Optional<String>
    The glider they would wear; empty in the Free edition, which glides without the catalog, or when every glider has been deleted.
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
    Gets the handler list for this event.
    @NotNull org.bukkit.entity.Player
    The player about to glide.
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GliderDeployEvent

      public GliderDeployEvent(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String gliderId)
  • Method Details

    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      The player about to glide.
    • getGliderId

      @NotNull public @NotNull Optional<String> getGliderId()
      The glider they would wear; empty in the Free edition, which glides without the catalog, or when every glider has been deleted.
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: ZentrixEvent
      Gets the handler list for this event.
      Overrides:
      getHandlers in class ZentrixEvent
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()