Package net.essentialsx.api.v2.events
Class WarpModifyEvent
java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.WarpModifyEvent
- All Implemented Interfaces:
Cancellable
Called when a warp is about to be modified.
Includes creation and deletion as described in
WarpModifyEvent.WarpModifyCause
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The cause of why a warp was modified.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionWarpModifyEvent
(IUser user, String warpName, Location oldLocation, Location newLocation, WarpModifyEvent.WarpModifyCause cause) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
static HandlerList
Gets the new location this warp is being updated to, or null if it's being deleted.Gets the current location of the warp or null if it's being created or if the previous location's world is not loaded.getUser()
boolean
void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
WarpModifyEvent
public WarpModifyEvent(IUser user, String warpName, Location oldLocation, Location newLocation, WarpModifyEvent.WarpModifyCause cause) - Parameters:
user
- theIUser
who is modifing the warp.warpName
- the name of the warp that's being altered.oldLocation
- the old location before being modified. Null ifWarpModifyEvent.WarpModifyCause.CREATE
or if the previous location's world is not loaded.newLocation
- the new location after being modified. Null ifWarpModifyEvent.WarpModifyCause.DELETE
.cause
- the cause of change.
-
-
Method Details
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceCancellable
-
getUser
-
getCause
-
getWarpName
-
getOldLocation
Gets the current location of the warp or null if it's being created or if the previous location's world is not loaded.- Returns:
- The warps new location or null.
-
getNewLocation
Gets the new location this warp is being updated to, or null if it's being deleted.- Returns:
- The warps new location or null.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-