mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Revert "Revert "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 reverts commit af2fc18ac4.
This commit is contained in:
1 parent
af2fc18ac4
commit
d338d4d1e2
2 files changed
+4
-15
No files matched your search
@@ -63,7 +63,6 @@ public class Backend {
|
||||
private Map<String, Boolean> blockBreakHolder = new HashMap<String, Boolean>();
|
||||
private Map<String, Long> lastBlockBroken = new HashMap<String, Long>();
|
||||
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> lastBlockPlaceTime = new HashMap<String, Long>();
|
||||
private Map<String, Integer> blockPunches = new HashMap<String, Integer>();
|
||||
@@ -138,7 +137,6 @@ public class Backend {
|
||||
blockBreakHolder.remove(pN);
|
||||
lastBlockBroken.remove(pN);
|
||||
fastPlaceViolation.remove(pN);
|
||||
lastZeroHitPlace.remove(pN);
|
||||
lastBlockPlaced.remove(pN);
|
||||
lastBlockPlaceTime.remove(pN);
|
||||
blockPunches.remove(pN);
|
||||
@@ -671,23 +669,14 @@ public class Backend {
|
||||
long last = lastBlockPlaced.get(name);
|
||||
long lastTime = lastBlockPlaceTime.get(name);
|
||||
long thisTime = time - last;
|
||||
boolean nocheck = thisTime < 1 || lastTime < 1;
|
||||
if (!lastZeroHitPlace.containsKey(name)) {
|
||||
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) {
|
||||
|
||||
if (thisTime < magic.FASTPLACE_TIMEMAX || lastTime < magic.FASTPLACE_TIMEMAX) {
|
||||
lastBlockPlaceTime.put(name, (time - last));
|
||||
lastBlockPlaced.put(name, time);
|
||||
fastPlaceViolation.put(name, fastPlaceViolation.get(name) + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
lastBlockPlaceTime.put(name, (time - last));
|
||||
}
|
||||
lastBlockPlaced.put(name, time);
|
||||
|
||||
@@ -22,7 +22,7 @@ FASTBREAK_MAXVIOLATIONS: 2
|
||||
FASTBREAK_MAXVIOLATIONS_CREATIVE: 4
|
||||
FASTBREAK_MAXVIOLATIONTIME: 10000
|
||||
FASTPLACE_ZEROLIMIT: 3
|
||||
FASTPLACE_TIMEMAX: 100
|
||||
FASTPLACE_TIMEMAX: 50
|
||||
FASTPLACE_MAXVIOLATIONS: 2
|
||||
FASTPLACE_MAXVIOLATIONS_CREATIVE: 3
|
||||
FASTPLACE_MAXVIOLATIONTIME: 10000
|
||||
|
||||
Reference in new issue
Block a user