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
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
ConstructorsConstructorDescriptionSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to) Creates a Spawn event. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationgetFrom()Gets the location from which the player is teleporting from.static org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListorg.bukkit.entity.PlayerGets the player whom is teleporting.org.bukkit.LocationgetTo()Gets the location to which the player is teleporting to.Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessageMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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:
getHandlersin classorg.bukkit.event.Event
-