Class SleepFinishedTimeEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.SleepFinishedTimeEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class SleepFinishedTimeEvent
extends LevelEvent
implements net.neoforged.bus.api.ICancellableEvent
This event is fired to adjust the clock of a level after sleep.
-
Nested Class Summary
Nested classes/interfaces inherited from class LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.Load, LevelEvent.PotentialSpawns, LevelEvent.Save, LevelEvent.Unload -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSleepFinishedTimeEvent(ServerLevel level, ClockAdjustment defaultAdjustment) -
Method Summary
Modifier and TypeMethodDescriptionReturns the adjustment that will be made to the clock when the event is not canceled.voidsetAdjustment(ClockAdjustment adjustment) Sets the new time which should be set when all players wake upMethods inherited from class LevelEvent
getLevelMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
adjustment
-
-
Constructor Details
-
SleepFinishedTimeEvent
-
-
Method Details
-
getAdjustment
Returns the adjustment that will be made to the clock when the event is not canceled.- Returns:
- the adjustment that will be made to the clock when the event is not canceled
-
setAdjustment
Sets the new time which should be set when all players wake up- Parameters:
adjustment- The adjustment that should be made to the levels clock when this event isn't canceled.
-