Class SleepingLocationCheckEvent


  • public class SleepingLocationCheckEvent
    extends LivingEvent
    This event is fired when game checks, if sleeping player should be still considered "in bed".
    Failing this check will cause player to wake up.
    This event has a result. Event.HasResult
    setResult(ALLOW) informs game that player is still "in bed"
    setResult(DEFAULT) causes game to check Block#isBed(IBlockState, net.minecraft.world.IWorldReader, BlockPos, Entity) instead
    • Field Detail

      • sleepingLocation

        private final BlockPos sleepingLocation
    • Constructor Detail

      • SleepingLocationCheckEvent

        public SleepingLocationCheckEvent​(LivingEntity player,
                                          BlockPos sleepingLocation)
    • Method Detail

      • getSleepingLocation

        public BlockPos getSleepingLocation()