public class SleepingTimeCheckEvent extends PlayerEvent
Event.HasResult
World.isDaytime()
instead.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Modifier and Type | Field and Description |
---|---|
private java.util.Optional<BlockPos> |
sleepingLocation |
Constructor and Description |
---|
SleepingTimeCheckEvent(PlayerEntity player,
java.util.Optional<BlockPos> sleepingLocation) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<BlockPos> |
getSleepingLocation()
Note that the sleeping location may be an approximated one.
|
getPlayer
getEntityLiving
getEntity
private final java.util.Optional<BlockPos> sleepingLocation
public SleepingTimeCheckEvent(PlayerEntity player, java.util.Optional<BlockPos> sleepingLocation)
public java.util.Optional<BlockPos> getSleepingLocation()