Added GhostHand and Unicode chat check and fixed broken fly check.

Furthermore:
+ Updated and documented magic.yml
+ Added support for missing CAVE_AIR material
+ Average ping for blink check can now be configured
+ Removed /acr update from help command
+ Added UpdateManager.java to be used in future update messages
+ Better MainHand/OffHand support

I've been busy :)
This commit is contained in:
Rammelkast committed 2020-03-24 20:15:31 +01:00
1 parent acea36929b
commit fec1286c8d
22 files changed
+596 -193

No files matched your search

@@ -67,11 +67,11 @@ public class GlideCheck {
if (VIOLATIONS.get(player.getUniqueId()) + 1 >= AntiCheatReloaded.getManager().getBackend().getMagic()
.GLIDE_LIMIT()) {
VIOLATIONS.remove(player.getUniqueId());
Location to = player.getLocation();
to.setY(to.getY() - distanceToFall(to));
player.teleport(to);
// Report glide violation to statistics, just for the lulz jk
AntiCheatReloaded.getPlugin().onGlideViolation();
if (!AntiCheatReloaded.getManager().getBackend().silentMode()) {
Location to = player.getLocation();
to.setY(to.getY() - distanceToFall(to));
player.teleport(to);
}
return new CheckResult(CheckResult.Result.FAILED,
player.getName() + " was set back for gliding (yDiff="
+ new BigDecimal(yDiff).setScale(2, RoundingMode.HALF_UP) + ")");
@@ -90,7 +90,8 @@ public class GlideCheck {
private static double distanceToFall(Location location) {
location = location.clone();
double firstY = location.getY();
while (location.clone().add(0, -0.1, 0).getBlock().getType() == Material.AIR)
Material subtractType = location.clone().add(0, -0.1, 0).getBlock().getType();
while (subtractType == Material.AIR || subtractType == Material.CAVE_AIR)
location.add(0, -0.1, 0);
return firstY - location.getY();
}