Class BlockUtils

java.lang.Object
dev.sefiraat.sefilib.block.BlockUtils

public final class BlockUtils extends Object
This class contains static methods for dealing with blocks.
  • Method Details

    • getTargetedBlockFace

      @Nullable public static BlockFace getTargetedBlockFace(@Nonnull Player player)
      Credits : https://www.spigotmc.org/threads/getting-the-blockface-of-a-targeted-block.319181/ Gets the BlockFace of the block the player is currently targeting.
      Parameters:
      player - the player's whose targeted blocks BlockFace is to be checked.
      Returns:
      the BlockFace of the targeted block, or null if the targeted block is non-occluding.
    • isSkullBlock

      public static boolean isSkullBlock(@Nonnull Block block)
      Returns true if the block is a Player Head or Wall Player Head
      Parameters:
      block - The block to test
      Returns:
      True if a player head (wall or not)