mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fixed #81, removed POS optifine check code that won't work & fixed console messaging
This commit is contained in:
1 parent
8cf2702708
commit
b2701fa057
11 files changed
+33
-76
No files matched your search
@@ -219,6 +219,29 @@ public final class Utilities {
|
||||
Material type = block.getType();
|
||||
return type.name().endsWith("SLAB");
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a block is a bed
|
||||
*
|
||||
* @param block block to bed
|
||||
* @return true if bed
|
||||
*/
|
||||
public static boolean isBed(Block block) {
|
||||
Material type = block.getType();
|
||||
return type.name().endsWith("BED");
|
||||
}
|
||||
|
||||
public static boolean isNearBed(Location location) {
|
||||
return isBed(location.getBlock())
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.NORTH))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.SOUTH))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.EAST))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.WEST))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.NORTH_EAST))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.NORTH_WEST))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.SOUTH_EAST))
|
||||
|| isBed(location.getBlock().getRelative(BlockFace.SOUTH_WEST));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a block is a stair
|
||||
|
||||
Reference in new issue
Block a user