Cancellable
public class TimeSkipEvent extends WorldEvent implements Cancellable
If the event is cancelled the time will not change.
Modifier and Type | Class | Description |
---|---|---|
static class |
TimeSkipEvent.SkipReason |
An enum specifying the reason the time skipped.
|
Event.Result
Constructor | Description |
---|---|
TimeSkipEvent(World world,
TimeSkipEvent.SkipReason skipReason,
long skipAmount) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
long |
getSkipAmount() |
Gets the amount of time that was skipped.
|
TimeSkipEvent.SkipReason |
getSkipReason() |
Gets the reason why the time has skipped.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setSkipAmount(long skipAmount) |
Sets the amount of time to skip.
|
getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWorld
public TimeSkipEvent(@NotNull World world, @NotNull TimeSkipEvent.SkipReason skipReason, @NotNull long skipAmount)
@NotNull public TimeSkipEvent.SkipReason getSkipReason()
public long getSkipAmount()
public void setSkipAmount(long skipAmount)
skipAmount
- Amount of time to skippublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.