Class HomeWarmupStartEvent

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

public class HomeWarmupStartEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired when a home teleport warmup begins.

Adjust the delay with setWarmupSeconds(long), or cancel the event to skip the warmup entirely.

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    HomeWarmupStartEvent(org.bukkit.entity.Player player, Home home, long warmupSeconds)
    Creates a new home warmup start 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
     
    Returns the destination home.
    org.bukkit.entity.Player
    Returns the teleporting player.
    long
    Returns the warmup delay in seconds.
    boolean
     
    void
    setCancelled(boolean cancel)
     
    void
    setCancelReason(String cancelReason)
    Sets why the event is being cancelled.
    void
    setWarmupSeconds(long warmupSeconds)
    Overrides the warmup delay.

    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

    • HomeWarmupStartEvent

      public HomeWarmupStartEvent(org.bukkit.entity.Player player, Home home, long warmupSeconds)
      Creates a new home warmup start event.
      Parameters:
      player - the teleporting player
      home - the destination home
      warmupSeconds - the warmup delay in seconds
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns the teleporting player.
      Returns:
      the player
    • getHome

      public Home getHome()
      Returns the destination home.
      Returns:
      the home
    • getWarmupSeconds

      public long getWarmupSeconds()
      Returns the warmup delay in seconds.
      Returns:
      warmup seconds
    • setWarmupSeconds

      public void setWarmupSeconds(long warmupSeconds)
      Overrides the warmup delay.
      Parameters:
      warmupSeconds - the new warmup in seconds
    • 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()