Class SkipNightEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.general.SkipNightEvent
- All Implemented Interfaces:
 Cancellable
Called when the night will be skipped (this happens when all players are sleeping in a bed during night time).
- 
Field Summary
 - 
Method Summary
Modifier and TypeMethodDescriptionintGets the current time (hour).intGets the current time (minutes).intGets the amount of minutes that will be skipped.intGets the target time (hour), i.e the new time after skipping the night.intGets the target time (minutes), i.e the new time after skipping the night.booleanDetermines if the event is cancelled.voidsetCancelled(boolean cancel) Cancels this event.voidsetTargetTime(int hours, int minutes) Sets a new target time, which is the time that will be set after skipping the night. 
- 
Method Details
- 
getSkippedMinutes
public int getSkippedMinutes()Gets the amount of minutes that will be skipped.- Returns:
 - the skipped minutes.
 
 - 
getCurrentHour
public int getCurrentHour()Gets the current time (hour).- Returns:
 - the current time.
 
 - 
getCurrentMinutes
public int getCurrentMinutes()Gets the current time (minutes).- Returns:
 - the current time.
 
 - 
getTargetHour
public int getTargetHour()Gets the target time (hour), i.e the new time after skipping the night.- Returns:
 - the new time (hour).
 
 - 
getTargetMinutes
public int getTargetMinutes()Gets the target time (minutes), i.e the new time after skipping the night.- Returns:
 - the new time (minutes).
 
 - 
setTargetTime
public void setTargetTime(int hours, int minutes) Sets a new target time, which is the time that will be set after skipping the night.- Parameters:
 hours- the new hours.minutes- the new minutes.- Example: After skipping a night, we want the time to be 3:30 pm
 
 - 
isCancelled
public boolean isCancelled()Description copied from interface:CancellableDetermines if the event is cancelled. If an event is cancelled, it will no longer be executed, but other plugins will still receive the event.
Please note: If the event is threaded, cancellation has no effect, i.e the event will still be executed.- Specified by:
 isCancelledin interfaceCancellable- Returns:
 - true if the event is cancelled, or false if not.
 
 - 
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableCancels this event. This means it will no longer be executed, but other plugins will still receive the event.- Specified by:
 setCancelledin interfaceCancellable- Parameters:
 cancel- set to true if you want to cancel this event.- Example: Cancel "PlayerEnterAreaEvent", i.e prevent player from entering an area
 
 
 -