public class TimeSkipEvent extends WorldEvent implements Cancellable
If the event is cancelled the time will not change.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
TimeSkipEvent.SkipReason
An enum specifying the reason the time skipped. 
 | 
Event.Result| Constructor and Description | 
|---|
TimeSkipEvent(@NotNull World world,
             @NotNull TimeSkipEvent.SkipReason skipReason,
             @NotNull long skipAmount)  | 
| Modifier and Type | Method and 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. 
 | 
getWorldgetEventName, isAsynchronouspublic TimeSkipEvent(@NotNull
                     @NotNull World world,
                     @NotNull
                     @NotNull TimeSkipEvent.SkipReason skipReason,
                     @NotNull
                     @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()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.