mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Fixed Fastbreak, zero-hit place code went out of business because of a bypass, so Bye bye pass! Now ./h31ix.sh --push-to-bukkitdev
This commit is contained in:
1 parent
ea5e5878bb
commit
600fee0036
1 file changed
+3
-14
@@ -63,7 +63,6 @@ public class Backend {
|
|||||||
private Map<String, Boolean> blockBreakHolder = new HashMap<String, Boolean>();
|
private Map<String, Boolean> blockBreakHolder = new HashMap<String, Boolean>();
|
||||||
private Map<String, Long> lastBlockBroken = new HashMap<String, Long>();
|
private Map<String, Long> lastBlockBroken = new HashMap<String, Long>();
|
||||||
private Map<String, Integer> fastPlaceViolation = new HashMap<String, Integer>();
|
private Map<String, Integer> fastPlaceViolation = new HashMap<String, Integer>();
|
||||||
private Map<String, Integer> lastZeroHitPlace = new HashMap<String, Integer>();
|
|
||||||
private Map<String, Long> lastBlockPlaced = new HashMap<String, Long>();
|
private Map<String, Long> lastBlockPlaced = new HashMap<String, Long>();
|
||||||
private Map<String, Long> lastBlockPlaceTime = new HashMap<String, Long>();
|
private Map<String, Long> lastBlockPlaceTime = new HashMap<String, Long>();
|
||||||
private Map<String, Integer> blockPunches = new HashMap<String, Integer>();
|
private Map<String, Integer> blockPunches = new HashMap<String, Integer>();
|
||||||
@@ -138,7 +137,6 @@ public class Backend {
|
|||||||
blockBreakHolder.remove(pN);
|
blockBreakHolder.remove(pN);
|
||||||
lastBlockBroken.remove(pN);
|
lastBlockBroken.remove(pN);
|
||||||
fastPlaceViolation.remove(pN);
|
fastPlaceViolation.remove(pN);
|
||||||
lastZeroHitPlace.remove(pN);
|
|
||||||
lastBlockPlaced.remove(pN);
|
lastBlockPlaced.remove(pN);
|
||||||
lastBlockPlaceTime.remove(pN);
|
lastBlockPlaceTime.remove(pN);
|
||||||
blockPunches.remove(pN);
|
blockPunches.remove(pN);
|
||||||
@@ -667,23 +665,14 @@ public class Backend {
|
|||||||
long last = lastBlockPlaced.get(name);
|
long last = lastBlockPlaced.get(name);
|
||||||
long lastTime = lastBlockPlaceTime.get(name);
|
long lastTime = lastBlockPlaceTime.get(name);
|
||||||
long thisTime = time - last;
|
long thisTime = time - last;
|
||||||
boolean nocheck = thisTime < 1 || lastTime < 1;
|
|
||||||
if (!lastZeroHitPlace.containsKey(name)) {
|
if (thisTime < magic.FASTPLACE_TIMEMAX || lastTime < magic.FASTPLACE_TIMEMAX) {
|
||||||
lastZeroHitPlace.put(name, 0);
|
|
||||||
}
|
|
||||||
if (nocheck) {
|
|
||||||
if (!lastZeroHitPlace.containsKey(name)) {
|
|
||||||
lastZeroHitPlace.put(name, 1);
|
|
||||||
} else {
|
|
||||||
lastZeroHitPlace.put(name, lastZeroHitPlace.get(name) + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (thisTime < magic.FASTPLACE_TIMEMAX && lastTime < magic.FASTPLACE_TIMEMAX && nocheck && lastZeroHitPlace.get(name) > magic.FASTPLACE_ZEROLIMIT) {
|
|
||||||
lastBlockPlaceTime.put(name, (time - last));
|
lastBlockPlaceTime.put(name, (time - last));
|
||||||
lastBlockPlaced.put(name, time);
|
lastBlockPlaced.put(name, time);
|
||||||
fastPlaceViolation.put(name, fastPlaceViolation.get(name) + 1);
|
fastPlaceViolation.put(name, fastPlaceViolation.get(name) + 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastBlockPlaceTime.put(name, (time - last));
|
lastBlockPlaceTime.put(name, (time - last));
|
||||||
}
|
}
|
||||||
lastBlockPlaced.put(name, time);
|
lastBlockPlaced.put(name, time);
|
||||||
|
|||||||
Reference in new issue
Block a user