public class PlayerSleepInBedEvent extends PlayerEvent
EntityPlayer.trySleep(BlockPos)
.result
contains whether the player is able to sleep. Cancelable
.
HasResult
MinecraftForge.EVENT_BUS
.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private BlockPos |
pos |
private EntityPlayer.SleepResult |
result |
Constructor and Description |
---|
PlayerSleepInBedEvent(EntityPlayer player,
BlockPos pos) |
Modifier and Type | Method and Description |
---|---|
BlockPos |
getPos() |
EntityPlayer.SleepResult |
getResultStatus() |
void |
setResult(EntityPlayer.SleepResult result) |
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private EntityPlayer.SleepResult result
private final BlockPos pos
public PlayerSleepInBedEvent(EntityPlayer player, BlockPos pos)
public EntityPlayer.SleepResult getResultStatus()
public void setResult(EntityPlayer.SleepResult result)
public BlockPos getPos()