Class CancelledTownyTeleportEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.teleport.CancelledTownyTeleportEvent
public class CancelledTownyTeleportEvent
extends org.bukkit.event.Event
An event thrown by Towny when a player that was supposed to teleport to the
/res, /town, or /nation spawn, but the action was cancelled. This can be due
to Movement, Damage or an Unknown source (when cancelled via the TownyAPI
class.
- Since:
- 0.100.2.2
- Author:
- LlmDl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionCancelledTownyTeleportEvent
(Resident resident, org.bukkit.Location location, double teleportCost, CancelledTownyTeleportEvent.CancelledTeleportReason reason) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
org.bukkit.Location
double
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
CancelledTownyTeleportEvent
public CancelledTownyTeleportEvent(Resident resident, org.bukkit.Location location, double teleportCost, CancelledTownyTeleportEvent.CancelledTeleportReason reason)
-
-
Method Details
-
getResident
- Returns:
- Resident which is not going to teleport.
-
getLocation
public org.bukkit.Location getLocation()- Returns:
- Location that resident was going to go to.
-
getTeleportCost
public double getTeleportCost()- Returns:
- the amount of money which was refunded to the player.
-
getReason
- Returns:
- the
CancelledTownyTeleportEvent.CancelledTeleportReason
that the resident will not teleport. When cancelled via the TownyAPI class, this will return UNKNOWN.
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-