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(@NotNull World world,
@NotNull TimeSkipEvent.SkipReason skipReason,
@org.jetbrains.annotations.NotNull long skipAmount) |
Modifier and Type | Method | Description |
---|---|---|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
long |
getSkipAmount() |
Gets the amount of time that was skipped.
|
@NotNull 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 @NotNull World world, @NotNull @NotNull TimeSkipEvent.SkipReason skipReason, @NotNull @org.jetbrains.annotations.NotNull long skipAmount)
@NotNull public @NotNull 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 @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.