Class SleepAllowSettingSpawnEvent
java.lang.Object
net.vitacraft.serverlibraries.api.event.events.entities.SleepAllowSettingSpawnEvent
- All Implemented Interfaces:
Event
Event that is fired when a player tries to sleep in a bed and the spawn point is being set.
-
Constructor Summary
ConstructorsConstructorDescriptionSleepAllowSettingSpawnEvent
(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.math.BlockPos pos) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.entity.player.PlayerEntity
boolean
void
setCancelled
(boolean cancelled)
-
Constructor Details
-
SleepAllowSettingSpawnEvent
public SleepAllowSettingSpawnEvent(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.math.BlockPos pos)
-
-
Method Details
-
getPlayer
public net.minecraft.entity.player.PlayerEntity getPlayer()- Returns:
- the player that is trying to sleep
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceEvent
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceEvent
-