mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Added/Fixed Glide check
This commit is contained in:
1 parent
831b82ff30
commit
9b87ce92eb
7 files changed
+42
-19
No files matched your search
@@ -48,7 +48,6 @@ public enum Permission {
|
||||
CHECK_VISUAL,
|
||||
CHECK_FASTINVENTORY,
|
||||
CHECK_AUTOTOOL,
|
||||
CHECK_GLIDE,
|
||||
|
||||
/* System Nodes */
|
||||
SYSTEM_LOG,
|
||||
|
||||
@@ -61,6 +61,19 @@ public final class Utilities {
|
||||
AntiCheat.getManager().log(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if only the block beneath them is standable (includes water + lava)
|
||||
* @param block the block to check (under)
|
||||
* @return true if they cannot stand there
|
||||
*/
|
||||
public static boolean cantStandAtSingle(Block block)
|
||||
{
|
||||
// TODO: Implement Better to reduce false positives (done? lets test...)
|
||||
Block otherBlock = block.getLocation().add(0, -0.5, 0).getBlock();
|
||||
boolean center = otherBlock.getType() == Material.AIR;
|
||||
return center;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player cannot stand on or around the given block
|
||||
|
||||
Reference in new issue
Block a user