Skip to content

Commit

Permalink
Fixed teleporting safe to blocks not working for warps (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Mar 19, 2022
1 parent ae36c30 commit b61c3c7
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -46,6 +46,10 @@ public static String getLocation(Location location) {
}

public static boolean isSafeBlock(Block block) {
return _isSafeBlock(block) || _isSafeBlock(block.getRelative(BlockFace.DOWN));
}

private static boolean _isSafeBlock(Block block) {
Block feetBlock = block.getRelative(BlockFace.UP);
Block headBlock = feetBlock.getRelative(BlockFace.UP);

Expand Down

0 comments on commit b61c3c7

Please sign in to comment.