mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fix KillAura false positive with Trident (#198)
This commit is contained in:
1 parent
15ba2a09b0
commit
e71707a84c
1 file changed
+7
-5
@@ -30,6 +30,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.cryptomorin.xseries.XMaterial;
|
||||
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
|
||||
import com.rammelkast.anticheatreloaded.check.CheckResult;
|
||||
import com.rammelkast.anticheatreloaded.check.CheckType;
|
||||
@@ -96,17 +97,18 @@ public final class KillAuraCheck {
|
||||
public static CheckResult checkAngle(final Player player, final EntityDamageEvent event) {
|
||||
final UUID uuid = player.getUniqueId();
|
||||
final Entity entity = event.getEntity();
|
||||
|
||||
// Do not check while in vehicles
|
||||
if (player.getVehicle() != null || entity.getVehicle() != null || player.getItemInUse() == XMaterial.TRIDENT.parseItem()) {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
final Checks checksConfig = AntiCheatReloaded.getManager().getConfiguration().getChecks();
|
||||
|
||||
// Check if enabled
|
||||
if (!checksConfig.isSubcheckEnabled(CheckType.KILLAURA, "angle")) {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
// Do not check while in vehicles
|
||||
if (player.getVehicle() != null || entity.getVehicle() != null) {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
final LivingEntity living = (LivingEntity) entity;
|
||||
|
||||
Reference in new issue
Block a user