vl.ash
📎 1 file 1,771 chars
📄
pasted-code-1793450182486.txt
txt 22 lines
▶
Create a high-performance, lightweight Minecraft Paper 1.20+ anti-cheat and security plugin named "VlashAntiCheat" (Dev By ABDOeg). The plugin must focus on detecting and preventing advanced, paid, and private hacked client modules. Specifically, implement the following advanced checks and features:

1. Auto-Totem & Offhand Exploits Detection:
   - Detect inhumanly fast totem popping (swapping totems into the offhand within a single tick or faster than legitimate human reaction time).
   - Prevent fake/ghost totem exploits and offhand desync glitches.
   - Configurable delay/cooldown on offhand item swaps.

2. Combat & PvP Checks:
   - Killaura / Multi-Aura: Detect abnormal attack angles, raycasting anomalies, hitting multiple entities simultaneously, and attacking outside legitimate reach.
   - Reach & Hitbox: Prevent players hitting from distances greater than vanilla limits (strict raytrace checking).
   - AutoClicker / Macro: Detect consistent or inhuman CPS (Clicks Per Second) combined with hit consistency.

3. Movement Checks:
   - Flight & Glide: Detect abnormal vertical movement, hovering, or lack of proper gravity simulation.
   - Speed & Strafe: Detect illegal ground/air speed manipulation.
   - NoSlowdown: Check if a player moves at full speed while using items, bowing, or eating.

4. Architecture & Performance:
   - Fully asynchronous processing for heavy math and packet analysis to ensure 0 lag spikes on the main server thread.
   - Highly configurable config.yml with toggleable checks, custom alert messages, and automatic punishments (kick, temporary ban, or staff notification).
   - Bypass permission node: anticheat.bypass for staff members.
   - Clean command structure /vlashac reload and /vlashac status.
Kodari AI
KodariOct 31 at 12:39 pm 2
VlashAntiCheat
VlashAntiCheat is a high-performance Paper 1.20+ anti-cheat plugin detecting advanced hacked client modules. It implements combat checks for killaura, reach, and autoclicker with strict raytracing. Movement verification catches flight, speed, and noslowdown exploits. Auto-totem detection identifies inhuman offhand swaps with configurable cooldowns. All packet analysis runs asynchronously to prevent server lag. Features toggleable checks, custom alert messages, automatic punishments, and staff bypass permissions. Includes /vlashac reload and status commands for complete administrative control.

I’ll build VlashAntiCheat with Paper event listeners, configurable detection and punishments, and asynchronous analysis of immutable movement/combat snapshots; Bukkit event handling and enforcement remain on the server thread.

Created VlashAntiCheat with configurable totem swap cooldowns, reach enforcement, combat and movement heuristics, staff alerts, violation thresholds, and kick or temporary-ban punishments. Added /vlashac reload and /vlashac status; anticheat.bypass exempts staff.

Movement and combat analysis runs asynchronously on captured snapshots; Bukkit event handling and enforcement stay on the server thread. This is event-based rather than packet-level: Paper events can’t directly verify client-side ghost inventory state, so the totem check blocks rapid swaps and refreshes the inventory instead.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 741
src/main/java/dev/abdoeg/vlashanticheat/VlashAntiCheat.java
package dev.abdoeg.vlashanticheat;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

public final class VlashAntiCheat extends JavaPlugin implements CommandExecutor {
    private DetectionEngine detectionEngine;
    private ViolationManager violationManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        violationManager = new ViolationManager(this);
        detectionEngine = new DetectionEngine(this);
        getServer().getPluginManager().registerEvents(new AntiCheatListener(this), this);
        getCommand("vlashac").setExecutor(this);
        getLogger().info("VlashAntiCheat enabled. Dev By ABDOeg");
    }

    @Override
    public void onDisable() {
        if (detectionEngine != null) {
            detectionEngine.shutdown();
        }
    }

    public DetectionEngine getDetectionEngine() {
        return detectionEngine;
    }

    public ViolationManager getViolationManager() {
        return violationManager;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length != 1) {
            sender.sendMessage(ChatColor.RED + "Usage: /vlashac <reload|status>");
            return true;
        }
        if (!sender.hasPermission("vlashac.admin")) {
            sender.sendMessage(ChatColor.RED + "You do not have permission to use this command.");
            return true;
        }

        if (args[0].equalsIgnoreCase("reload")) {
            reloadConfig();
            detectionEngine.reloadSettings();
            sender.sendMessage(ChatColor.GREEN + "VlashAntiCheat configuration reloaded.");
            return true;
        }
        if (args[0].equalsIgnoreCase("status")) {
            sender.sendMessage(ChatColor.GOLD + "VlashAntiCheat status:");
            sender.sendMessage(ChatColor.YELLOW + "Totem checks: " + enabled("checks.totem.enabled"));
            sender.sendMessage(ChatColor.YELLOW + "Reach: " + enabled("checks.combat.reach.enabled")
                    + " | Killaura: " + enabled("checks.combat.killaura.enabled")
                    + " | Multi-aura: " + enabled("checks.combat.multiaura.enabled")
                    + " | Auto-clicker: " + enabled("checks.combat.autoclicker.enabled"));
            sender.sendMessage(ChatColor.YELLOW + "Flight: " + enabled("checks.movement.flight.enabled")
                    + " | Speed: " + enabled("checks.movement.speed.enabled")
                    + " | NoSlow: " + enabled("checks.movement.noslow.enabled"));
            sender.sendMessage(ChatColor.YELLOW + "Punishment threshold: "
                    + getConfig().getInt("punishments.violation-threshold", 12));
            return true;
        }

        sender.sendMessage(ChatColor.RED + "Usage: /vlashac <reload|status>");
        return true;
    }

    private boolean enabled(String path) {
        return getConfig().getBoolean(path, true);
    }
}