Package net.essentialsx.api.v2.events
Class HomeModifyEvent
java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.HomeModifyEvent
- All Implemented Interfaces:
Cancellable
Called when a home is about to be modified.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The cause of why a home was modified.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionHomeModifyEvent
(IUser user, IUser homeOwner, String name, Location location, boolean create) HomeModifyEvent
(IUser user, IUser homeOwner, String name, Location oldLocation, Location newLocation) HomeModifyEvent
(IUser user, IUser homeOwner, Location newLocation, Location oldLocation, String newName, String oldName, HomeModifyEvent.HomeModifyCause cause) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Returns the underlying cause of this modification to a home.static HandlerList
Gets the owner of the home being modified.Returns the location of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.CREATE
orHomeModifyEvent.HomeModifyCause.RENAME
, returns the updated location of the home if it returnsHomeModifyEvent.HomeModifyCause.UPDATE
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.DELETE
.Returns the name of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.CREATE
orHomeModifyEvent.HomeModifyCause.UPDATE
, returns the updated name if it returnsHomeModifyEvent.HomeModifyCause.RENAME
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.DELETE
.Returns the location of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.RENAME
orHomeModifyEvent.HomeModifyCause.DELETE
, returns the previous location of the home if it returnsHomeModifyEvent.HomeModifyCause.UPDATE
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.CREATE
.Returns the name of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.UPDATE
orHomeModifyEvent.HomeModifyCause.DELETE
, returns the previous name if it returnsHomeModifyEvent.HomeModifyCause.RENAME
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.CREATE
.getUser()
Gets the user who modified the home or null if the console modified the home.boolean
void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
HomeModifyEvent
-
HomeModifyEvent
-
HomeModifyEvent
-
HomeModifyEvent
-
-
Method Details
-
getUser
Gets the user who modified the home or null if the console modified the home.- Returns:
- The user who modified the home or null.
-
getHomeOwner
Gets the owner of the home being modified.- Returns:
- The user who owns the home.
-
getNewLocation
Returns the location of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.CREATE
orHomeModifyEvent.HomeModifyCause.RENAME
, returns the updated location of the home if it returnsHomeModifyEvent.HomeModifyCause.UPDATE
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.DELETE
.- Returns:
- The location of the home or null.
-
getOldLocation
Returns the location of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.RENAME
orHomeModifyEvent.HomeModifyCause.DELETE
, returns the previous location of the home if it returnsHomeModifyEvent.HomeModifyCause.UPDATE
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.CREATE
.- Returns:
- The location of the home or null.
-
getNewName
Returns the name of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.CREATE
orHomeModifyEvent.HomeModifyCause.UPDATE
, returns the updated name if it returnsHomeModifyEvent.HomeModifyCause.RENAME
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.DELETE
.- Returns:
- The name of the home or null.
-
getOldName
Returns the name of the home whengetCause()
returnsHomeModifyEvent.HomeModifyCause.UPDATE
orHomeModifyEvent.HomeModifyCause.DELETE
, returns the previous name if it returnsHomeModifyEvent.HomeModifyCause.RENAME
, or returns null if it returnsHomeModifyEvent.HomeModifyCause.CREATE
.- Returns:
- The name of the home or null.
-
getCause
Returns the underlying cause of this modification to a home.- Returns:
- The cause.
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceCancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-