Class PlayerRiptideEvent

All Implemented Interfaces:
Cancellable

public class PlayerRiptideEvent extends PlayerEvent implements Cancellable
This event is fired when the player activates the riptide enchantment, using their trident to propel them through the air.
N.B. the riptide action is currently performed client side, so manipulating the player in this event may have undesired effects.
  • Constructor Details

    • PlayerRiptideEvent

      @Internal public PlayerRiptideEvent(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack item, @NotNull @NotNull Vector velocity)
    • PlayerRiptideEvent

      @Internal @Deprecated(since="1.20.4", forRemoval=true) public PlayerRiptideEvent(@NotNull @NotNull Player player, @NotNull @NotNull ItemStack item)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getItem

      @NotNull public @NotNull ItemStack getItem()
      Gets the item containing the used enchantment.
      Returns:
      held enchanted item
    • getVelocity

      @NotNull public @NotNull Vector getVelocity()
      Get the velocity applied to the player as a result of this riptide.
      Returns:
      the riptide velocity
    • 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()