Class WarpUpdateEvent

java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.warp.event.WarpUpdateEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class WarpUpdateEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired when a warp's settings are about to change via WarpManager.updateWarp(net.godlycow.org.essc.api.warp.Warp).

Cancelling this event vetoes the edit. Communicate why via setCancelReason(String).

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    WarpUpdateEvent(org.bukkit.entity.Player player, Warp warp)
    Creates a new warp update event.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns why the event was cancelled, or an empty string if not cancelled.
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.entity.Player
    Returns the player triggering the update.
    Returns the warp being updated.
    boolean
     
    void
    setCancelled(boolean cancel)
     
    void
    setCancelReason(String cancelReason)
    Sets why the event is being 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

    • WarpUpdateEvent

      public WarpUpdateEvent(org.bukkit.entity.Player player, Warp warp)
      Creates a new warp update event.
      Parameters:
      player - the player triggering the update
      warp - the warp being updated (with the pending changes applied)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns the player triggering the update.
      Returns:
      the player
    • getWarp

      public Warp getWarp()
      Returns the warp being updated.
      Returns:
      the warp
    • getCancelReason

      public String getCancelReason()
      Returns why the event was cancelled, or an empty string if not cancelled.
      Returns:
      the cancel reason
    • setCancelReason

      public void setCancelReason(String cancelReason)
      Sets why the event is being cancelled.
      Parameters:
      cancelReason - the cancel reason
    • isCancelled

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

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

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

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