Class SpawnEvent

java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.SpawnEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
NationSpawnEvent, ResidentSpawnEvent, TownSpawnEvent

public abstract class SpawnEvent extends CancellableTownyEvent
A class which provides the basis for spawn events.
Author:
Suneet Tipirneni (Siris)
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    SpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to)
    Creates a Spawn event.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.Location
    Gets the location from which the player is teleporting from.
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    org.bukkit.entity.Player
    Gets the player whom is teleporting.
    org.bukkit.Location
    Gets the location to which the player is teleporting to.

    Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent

    getCancelMessage, isCancelled, setCancelled, setCancelMessage

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • SpawnEvent

      public SpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to)
      Creates a Spawn event.
      Parameters:
      player - The player spawning.
      from - The from location.
      to - The to location.
  • Method Details

    • getFrom

      public org.bukkit.Location getFrom()
      Gets the location from which the player is teleporting from.
      Returns:
      The location being teleported from.
    • getTo

      public org.bukkit.Location getTo()
      Gets the location to which the player is teleporting to.
      Returns:
      The location being teleported to.
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Gets the player whom is teleporting.
      Returns:
      The player teleporting.
    • getHandlerList

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

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event