Class DominionSetTpLocationEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
cn.lunadeer.dominion.events.dominion.modify.DominionSetTpLocationEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Event triggered when a teleport location is set for a Dominion in the Dominion system.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionDominionSetTpLocationEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull org.bukkit.Location newTpLocation) Constructs a new DominionSetTpLocationEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.LocationGets the new teleport location.@NotNull org.bukkit.LocationGets the old teleport location.voidsetNewTpLocation(@NotNull org.bukkit.Location newTpLocation) Sets the new teleport location.Methods inherited from class cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
afterModified, getDominion, getFutureToComplete, setDominionMethods inherited from class cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelledMethods inherited from class cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
DominionSetTpLocationEvent
public DominionSetTpLocationEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull org.bukkit.Location newTpLocation) Constructs a new DominionSetTpLocationEvent.- Parameters:
operator- the command sender who initiated the eventdominion- the dominion for which the teleport location is being setnewTpLocation- the new teleport location
-
-
Method Details
-
getOldTpLocation
@NotNull public @NotNull org.bukkit.Location getOldTpLocation()Gets the old teleport location.- Returns:
- the old teleport location, or null if it was not set
-
getNewTpLocation
@NotNull public @NotNull org.bukkit.Location getNewTpLocation()Gets the new teleport location.- Returns:
- the new teleport location
-
setNewTpLocation
public void setNewTpLocation(@NotNull @NotNull org.bukkit.Location newTpLocation) Sets the new teleport location.- Parameters:
newTpLocation- the new teleport location to set
-