mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Ready for pre-release; Removed broken code, finished config migrations and fixed false positive
This commit is contained in:
1 parent
07f3c3abce
commit
168c25e5d2
16 files changed
+156
-313
No files matched your search
@@ -32,7 +32,6 @@ import com.rammelkast.anticheatreloaded.check.CheckResult;
|
||||
import com.rammelkast.anticheatreloaded.check.CheckType;
|
||||
import com.rammelkast.anticheatreloaded.check.combat.KillAuraCheck;
|
||||
import com.rammelkast.anticheatreloaded.config.providers.Checks;
|
||||
import com.rammelkast.anticheatreloaded.config.providers.Magic;
|
||||
import com.rammelkast.anticheatreloaded.util.User;
|
||||
import com.rammelkast.anticheatreloaded.util.Utilities;
|
||||
import com.rammelkast.anticheatreloaded.util.VersionUtil;
|
||||
@@ -88,11 +87,10 @@ public class IllegalInteract {
|
||||
}
|
||||
|
||||
private static boolean isValidTarget(Player player, Block block) {
|
||||
Magic magic = AntiCheatReloaded.getManager().getConfiguration().getMagic();
|
||||
Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
|
||||
double distance = player.getGameMode() == GameMode.CREATIVE ? magic.BLOCK_MAX_DISTANCE_CREATIVE()
|
||||
: player.getLocation().getDirection().getY() > 0.9 ? magic.BLOCK_MAX_DISTANCE_CREATIVE()
|
||||
: magic.BLOCK_MAX_DISTANCE();
|
||||
double distance = player.getGameMode() == GameMode.CREATIVE ? 6.0
|
||||
: player.getLocation().getDirection().getY() > 0.9 ? 6.0
|
||||
: 5.5;
|
||||
Block targetBlock = VersionUtil.getTargetBlock(player, ((int) Math.ceil(distance)));
|
||||
if (targetBlock == null) {
|
||||
// TODO better check here
|
||||
|
||||
Reference in new issue
Block a user