Contents
Class ModifyWarpEvent
java.lang.Object
com.hypixel.hytale.builtin.teleport.commands.event.ModifyWarpEvent
- All Implemented Interfaces:
IBaseEvent<String>, ICancellable, IEvent<String>
- Direct Known Subclasses:
RemoveWarpEvent, ReplaceWarpEvent
Abstract base class for events that modify an existing warp.
Fired before modification or removal of a warp is applied. Listeners may cancel the event to prevent the modification from taking place.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels the modification with a reason.Gets the reason why the modification was cancelled.getWarp()Gets the warp being modified.booleanDetermines whether this event has been cancelled.voidsetCancelled(boolean cancelled) Called to set whether this event is cancelled.toString()
-
Constructor Details
-
ModifyWarpEvent
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:ICancellableDetermines whether this event has been cancelled.- Specified by:
isCancelledin interfaceICancellable- Returns:
trueif the event has been cancelled,falseotherwise.
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:ICancellableCalled to set whether this event is cancelled.- Specified by:
setCancelledin interfaceICancellable- Parameters:
cancelled-trueto cancel the event,falseto uncancel it.
-
getWarp
-
getCancelReason
Gets the reason why the modification was cancelled.- Returns:
- the cancel reason
-
cancel
Cancels the modification with a reason.- Parameters:
reason- the reason for cancellation
-
toString
-