mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Started working on KillAura check
This commit is contained in:
1 parent
804b5ea944
commit
e37a6b8764
9 files changed
+146
-6
No files matched your search
@@ -37,6 +37,7 @@ import org.bukkit.event.player.PlayerToggleSprintEvent;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import net.gravitydevelopment.anticheat.AntiCheat;
|
||||
import net.gravitydevelopment.anticheat.check.combat.KillAuraCheck;
|
||||
import net.gravitydevelopment.anticheat.check.movement.FlightCheck;
|
||||
import net.gravitydevelopment.anticheat.check.movement.GlideCheck;
|
||||
import net.gravitydevelopment.anticheat.check.movement.WaterWalkCheck;
|
||||
@@ -116,6 +117,7 @@ public class Backend {
|
||||
public void garbageClean(Player player) {
|
||||
String pN = player.getName();
|
||||
|
||||
KillAuraCheck.cleanPlayer(player);
|
||||
blocksDropped.remove(pN);
|
||||
blockTime.remove(pN);
|
||||
FlightCheck.movingExempt.remove(pN);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package net.gravitydevelopment.anticheat.check.combat;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
||||
import net.gravitydevelopment.anticheat.util.CheckerNPCS;
|
||||
|
||||
/**
|
||||
* @author Marco
|
||||
* STILL IN HEAVY DEVELOPMENT!
|
||||
*/
|
||||
public class KillAuraCheck {
|
||||
|
||||
private static final Map<UUID, CheckerNPCS> CHECKER_NPCS = new HashMap<UUID, CheckerNPCS>();
|
||||
|
||||
public static void cleanPlayer(Player p) {
|
||||
CHECKER_NPCS.remove(p.getUniqueId());
|
||||
}
|
||||
|
||||
public static void doDamageEvent(EntityDamageByEntityEvent e, Player p) {
|
||||
if (!CHECKER_NPCS.containsKey(p.getUniqueId())) { // Enable killaura check after player damaged other player, this is more efficient
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user