Package dev.sefiraat.sefilib.block
Class BlockUtils
java.lang.Object
dev.sefiraat.sefilib.block.BlockUtils
This class contains static methods for dealing with blocks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockFacegetTargetedBlockFace(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.static booleanisSkullBlock(Block block) Returns true if the block is a Player Head or Wall Player Head
-
Method Details
-
getTargetedBlockFace
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
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)
-