Class SleepAllowSettingSpawnEvent

java.lang.Object
net.vitacraft.serverlibraries.api.event.events.entities.SleepAllowSettingSpawnEvent
All Implemented Interfaces:
Event

public class SleepAllowSettingSpawnEvent extends Object implements Event
Event that is fired when a player tries to sleep in a bed and the spawn point is being set.
  • 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 interface Event
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Event