Class SleepStartEvent
java.lang.Object
net.vitacraft.serverlibraries.api.event.events.entities.SleepStartEvent
- All Implemented Interfaces:
Event
Event that is fired when a player tries to sleep in a bed.
-
Constructor Summary
ConstructorsConstructorDescriptionSleepStartEvent
(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos pos) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.entity.LivingEntity
net.minecraft.util.math.BlockPos
getPos()
boolean
void
setCancelled
(boolean cancelled)
-
Constructor Details
-
SleepStartEvent
public SleepStartEvent(net.minecraft.entity.LivingEntity entity, net.minecraft.util.math.BlockPos pos)
-
-
Method Details
-
getEntity
public net.minecraft.entity.LivingEntity getEntity()- Returns:
- the player that is trying to sleep
-
getPos
public net.minecraft.util.math.BlockPos getPos()- Returns:
- the position of the bed the player is trying to sleep in
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceEvent
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceEvent
-