mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix for whatever messed up when I merged the sneaking if statements.
This commit is contained in:
1 parent
55eb3738f7
commit
f66db829f7
1 file changed
+12
-6
@@ -232,13 +232,19 @@ public class PlayerListener implements Listener {
|
||||
//Nothing to do
|
||||
}
|
||||
//Otherwise, are they sneaking?
|
||||
else if(player.isSneaking() && !player.hasPermission("anticheat.sneakhack") && !player.isFlying() && xd > 0.2D || zd > 0.2D)
|
||||
else if(player.isSneaking())
|
||||
{
|
||||
tracker.increaseLevel(player,2);
|
||||
plugin.log(player.getName()+" is sneaking too fast! "+speed);
|
||||
event.setTo(event.getFrom().clone());
|
||||
//If they are, force them out of it.
|
||||
player.setSneaking(false);
|
||||
if(!player.hasPermission("anticheat.sneakhack") && !player.isFlying())
|
||||
{
|
||||
if(xd > 0.2D || zd > 0.2D)
|
||||
{
|
||||
tracker.increaseLevel(player,2);
|
||||
plugin.log(player.getName()+" is sneaking too fast! "+speed);
|
||||
event.setTo(event.getFrom().clone());
|
||||
//If they are, force them out of it.
|
||||
player.setSneaking(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Otherwise set a hardcoded limit to any other traveling
|
||||
else if(xd > 0.4D || zd > 0.4D)
|
||||
|
||||
Reference in new issue
Block a user