swet25112009-dot
📎 1 file 3,023 chars
📄
pasted-code-1777999961360.txt
txt 145 lines
▶
Create a professional, high-performance Minecraft Anti-Cheat plugin using Spigot/Paper API in Java.

Main Goal:
Detect and prevent most common Minecraft hacks with minimal false positives and optimized performance.

Detections to include:

1. Combat Hacks:

* Kill Aura:

  * Detect abnormal CPS (Clicks Per Second)
  * Detect invalid rotations (hitting without aiming properly)
  * Detect hitting multiple entities instantly
* Reach Hack:

  * Detect hitting from longer than normal distance
* Criticals Hack:

  * Detect fake critical hits without falling
* Auto Clicker:

  * Detect consistent click patterns (inhuman timing)

2. Movement Hacks:

* Speed Hack:

  * Detect abnormal movement speed
* Fly Hack:

  * Detect illegal air time without permission
* Jesus Hack:

  * Detect walking on water
* NoFall:

  * Detect no fall damage when it should occur
* Step Hack:

  * Detect stepping higher than normal blocks
* Glide:

  * Detect unnatural slow falling

3. Player Behavior Hacks:

* Scaffold:

  * Detect fast/block placement under player while moving
* FastPlace:

  * Detect placing blocks too quickly
* FastBreak:

  * Detect breaking blocks faster than allowed
* Inventory Move:

  * Detect moving while inventory is open

4. Exploit Protection:

* Packet spam / abnormal behavior detection
* Timer hack (game speed manipulation)
* Anti illegal item usage (optional basic check)

Core System:

Violation Level (VL):

* Each detection increases VL
* VL decreases slowly over time
* Separate VL for each hack type

Thresholds:

* Low VL → log only
* Medium VL → admin alert
* High VL → punishment

Punishment System:

* Configurable actions:

  * warn
  * kick
  * temporary ban
  * permanent ban
* Command execution support (console commands)

Silent Detection Mode:

* Only admins with permission "anticheat.alert" receive alerts
* No message to normal players
* Alert format:
  [AntiCheat] %player% flagged for %check% (VL: %vl%)

Commands:

* /ac reload → reload config
* /ac alerts → toggle alerts
* /ac info  → show player violations

Configuration (config.yml):

* Enable/disable each check individually
* Set VL limits and decay speed
* Customize punishments
* Toggle debug mode
* Toggle silent mode

Performance Requirements:

* Use efficient math and tick-based checks
* Avoid heavy loops
* Optimize for large servers

Code Structure:

* Modular design:

  * separate class for each check (SpeedCheck, KillAuraCheck, FlyCheck, etc.)
* Use Spigot events:

  * PlayerMoveEvent
  * EntityDamageByEntityEvent
  * BlockBreakEvent
  * BlockPlaceEvent
* Add comments and clean structure

Extra Features:

* Anti false-positive system (ignore lag, TPS drops)
* TPS check before flagging
* Ping compensation system
* Console logging
* Debug mode for testing

Output Required:

* Full working plugin code
* plugin.yml
* config.yml
* Proper folder structure
Kodari AI
KodariMay 5 at 4:56 pm 23,231 (v2)

I’ll create a professional Anti-Cheat plugin with modular detection system, violation tracking, and performance optimization.

VanguardAC
Advanced Minecraft anti-cheat system featuring comprehensive hack detection for combat, movement, and player exploits. Includes intelligent violation tracking with decay, configurable punishment system, silent alerts for staff, and performance-optimized checks with TPS/ping compensation. Detects KillAura, Reach, Speed, Fly, Scaffold, and 10+ other common hacks with minimal false positives.

Now I’ll create the remaining core files:

Now creating combat checks:

Now creating movement checks:

Now creating player checks:

Finally, creating exploit checks:


VanguardAC created successfully.

Complete anti-cheat system with 16 detection modules across combat, movement, player behavior, and exploits. Features violation tracking with decay, configurable punishments, TPS compensation, silent alerts for staff, and performance-optimized checks. All checks are independently configurable via config.yml with customizable thresholds and VL limits.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
28 1,616
src/main/java/com/vanguard/anticheat/VanguardAC.java
package com.vanguard.anticheat;

import com.vanguard.anticheat.command.ACCommand;
import com.vanguard.anticheat.manager.CheckManager;
import com.vanguard.anticheat.manager.ConfigManager;
import com.vanguard.anticheat.manager.PunishmentManager;
import com.vanguard.anticheat.manager.ViolationManager;
import com.vanguard.anticheat.util.TPSUtil;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class VanguardAC extends JavaPlugin {
    
    private ConfigManager configManager;
    private ViolationManager violationManager;
    private CheckManager checkManager;
    private PunishmentManager punishmentManager;
    private TPSUtil tpsUtil;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.violationManager = new ViolationManager(this);
        this.checkManager = new CheckManager(this);
        this.punishmentManager = new PunishmentManager(this);
        this.tpsUtil = new TPSUtil(this);
        
        getCommand("ac").setExecutor(new ACCommand(this));
        
        getLogger().info("VanguardAC v" + getDescription().getVersion() + " enabled");
        getLogger().info("Loaded " + checkManager.getActiveChecks() + " checks");
    }
    
    @Override
    public void onDisable() {
        violationManager.shutdown();
        getLogger().info("VanguardAC disabled");
    }
}