Interface EntitySleepEvents.AllowSettingSpawn

Enclosing class:
EntitySleepEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface EntitySleepEvents.AllowSettingSpawn
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    allowSettingSpawn(PlayerEntity player, BlockPos sleepingPos)
    Checks whether a player's spawn can be set when sleeping.
  • Method Details

    • allowSettingSpawn

      boolean allowSettingSpawn(PlayerEntity player, BlockPos sleepingPos)
      Checks whether a player's spawn can be set when sleeping.
      Parameters:
      player - the sleeping player
      sleepingPos - the sleeping position
      Returns:
      true if allowed, false otherwise