Klasse SkipNightEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.general.SkipNightEvent
- Alle implementierten Schnittstellen:
Cancellable
Called when the night will be skipped (this happens when all players are sleeping in a bed during night time).
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Gets the current time (hour).int
Gets the current time (minutes).int
Gets the amount of minutes that will be skipped.int
Gets the target time (hour), i.e the new time after skipping the night.int
Gets the target time (minutes), i.e the new time after skipping the night.boolean
Determines if the event is cancelled.void
setCancelled
(boolean cancel) Cancels this event.void
setTargetTime
(int hours, int minutes) Sets a new target time, which is the time that will be set after skipping the night.
-
Methodendetails
-
getSkippedMinutes
public int getSkippedMinutes()Gets the amount of minutes that will be skipped.- Gibt zurück:
- the skipped minutes.
-
getCurrentHour
public int getCurrentHour()Gets the current time (hour).- Gibt zurück:
- the current time.
-
getCurrentMinutes
public int getCurrentMinutes()Gets the current time (minutes).- Gibt zurück:
- the current time.
-
getTargetHour
public int getTargetHour()Gets the target time (hour), i.e the new time after skipping the night.- Gibt zurück:
- the new time (hour).
-
getTargetMinutes
public int getTargetMinutes()Gets the target time (minutes), i.e the new time after skipping the night.- Gibt zurück:
- 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.- Parameter:
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()Beschreibung aus Schnittstelle kopiert:Cancellable
Determines 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.- Angegeben von:
isCancelled
in SchnittstelleCancellable
- Gibt zurück:
- true if the event is cancelled, or false if not.
-
setCancelled
public void setCancelled(boolean cancel) Beschreibung aus Schnittstelle kopiert:Cancellable
Cancels this event. This means it will no longer be executed, but other plugins will still receive the event.- Angegeben von:
setCancelled
in SchnittstelleCancellable
- Parameter:
cancel
- set to true if you want to cancel this event.- Example: Cancel "PlayerEnterAreaEvent", i.e prevent player from entering an area
-