mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
Fixed flight detection on edge of stairs, and possible error when kicking players
This commit is contained in:
1 parent
493a9c8d33
commit
6d611b905f
2 files changed
+23
-16
No files matched your search
@@ -597,7 +597,7 @@ public class Backend
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if(player.isSneaking() && Utilities.isStair(block.getRelative(BlockFace.NORTH)) || Utilities.isStair(block.getRelative(BlockFace.SOUTH)) || Utilities.isStair(block.getRelative(BlockFace.EAST)) || Utilities.isStair(block.getRelative(BlockFace.WEST)))
|
||||
else if(player.isSneaking() && (Utilities.isStair(block.getRelative(BlockFace.NORTH)) || Utilities.isStair(block.getRelative(BlockFace.SOUTH)) || Utilities.isStair(block.getRelative(BlockFace.EAST)) || Utilities.isStair(block.getRelative(BlockFace.WEST)) || Utilities.isStair(block.getRelative(BlockFace.NORTH_EAST)) || Utilities.isStair(block.getRelative(BlockFace.SOUTH_EAST)) || Utilities.isStair(block.getRelative(BlockFace.SOUTH_WEST)) || Utilities.isStair(block.getRelative(BlockFace.NORTH_WEST))))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -69,25 +69,32 @@ public class User
|
||||
|
||||
public boolean increaseLevel(CheckType type)
|
||||
{
|
||||
if(silentMode && type.getUses(name) % 4 != 0)
|
||||
if(getPlayer().isOnline())
|
||||
{
|
||||
// Prevent silent mode from increasing the level way too fast
|
||||
return false;
|
||||
if(silentMode && type.getUses(name) % 4 != 0)
|
||||
{
|
||||
// Prevent silent mode from increasing the level way too fast
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
level++;
|
||||
if(level == med)
|
||||
{
|
||||
Anticheat.getManager().getUserManager().alertMed(this, type);
|
||||
}
|
||||
else if(level == high)
|
||||
{
|
||||
Anticheat.getManager().getUserManager().alertHigh(this, type);
|
||||
// Prevent the player from going over the high limit
|
||||
level = high-10;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
level++;
|
||||
if(level == med)
|
||||
{
|
||||
Anticheat.getManager().getUserManager().alertMed(this, type);
|
||||
}
|
||||
else if(level == high)
|
||||
{
|
||||
Anticheat.getManager().getUserManager().alertHigh(this, type);
|
||||
// Prevent the player from going over the high limit
|
||||
level = high-10;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user