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
ConstructorDescriptionResidentSpawnEvent
(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, boolean cancelled, String cancelMessage) -
Method Summary
Modifier and TypeMethodDescription@Nullable Town
Gets the town being teleported from.Gets the town that the player is teleporting to.Methods inherited from class com.palmergames.bukkit.towny.event.SpawnEvent
getFrom, getHandlerList, getHandlers, getPlayer, getTo
Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessage
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ResidentSpawnEvent
public ResidentSpawnEvent(org.bukkit.entity.Player player, org.bukkit.Location from, org.bukkit.Location to, 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.
-