Package net.minecraftforge.event.level
Class SleepFinishedTimeEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.LevelEvent
net.minecraftforge.event.level.SleepFinishedTimeEvent
This event is fired when all players are asleep and the time should be set to day.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.level.LevelEventLevelEvent.CreateSpawnPosition, LevelEvent.Load, LevelEvent.PotentialSpawns, LevelEvent.Save, LevelEvent.UnloadNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongbooleansetTimeAddition(long newTimeIn) Sets the new time which should be set when all players wake upMethods inherited from class net.minecraftforge.event.level.LevelEventgetLevelMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
newTimeprivate long newTime
- 
minTimeprivate final long minTime
 
- 
- 
Constructor Details- 
SleepFinishedTimeEvent
 
- 
- 
Method Details- 
getNewTimepublic long getNewTime()- Returns:
- the new time
 
- 
setTimeAdditionpublic boolean setTimeAddition(long newTimeIn) Sets the new time which should be set when all players wake up- Parameters:
- newTimeIn- The new time at wakeup
- Returns:
- falseif newTimeIn was lower than current time
 
 
-