Class ResidentSpawnEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.SpawnEvent
com.palmergames.bukkit.towny.event.teleport.ResidentSpawnEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
An event called when /res spawn occurs.
- Author:
- LlmDl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionResidentSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, double cost, boolean cancelled, String cancelMessage) -
Method Summary
Modifier and TypeMethodDescription@Nullable TownGets the town being teleported from.Gets the town that the player is teleporting to.Methods inherited from class SpawnEvent
getCost, getFrom, getHandlerList, getHandlers, getPlayer, getToMethods inherited from class CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessageMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
ResidentSpawnEvent
public ResidentSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, double cost, boolean cancelled, String cancelMessage)
-
-
Method Details
-
getToTown
Gets the town that the player is teleporting to.- Returns:
- The Town being teleported to.
-
getFromTown
Gets the town being teleported from.- Returns:
- null if the player was not standing in a townblock, the town they were standing in otherwise.
-