your.boy.jayp31

Create the best custom anti-cheat plugin for Minecraft Paper 1.21.11 using Java 25. Detect and block KillAura, reach, aim assist, autoclickers, fly, speed, scaffold, timer, phase, no-fall, anti-knockback, criticals, inventory exploits, packet exploits, fast-break, and other common cheats. Include real-time movement and combat checks, violation tracking, staff alerts, evidence logs, configurable settings, admin commands, and optimized performance. False-ban prevention is the top priority: never automatically ban based on a single detection, account for ping, lag, legitimate abilities, potions, and normal gameplay, use multiple independent checks, and default to alerts or temporary restrictions when uncertain. Make all features functional, minimize lag, ensure compatibility with Paper plugins, and provide simple installation instructions.

Kodari AI
KodariOct 15 at 6:16 pm 3
SentinelAntiCheat
SentinelAntiCheat is a comprehensive Paper 1.21.11 anti-cheat plugin prioritizing false-ban prevention. It detects KillAura, reach, aim assist, autoclickers, fly, speed, scaffold, timer, phase, no-fall, anti-knockback, criticals, inventory exploits, packet exploits, and fast-break through multiple independent movement and combat checks. Features real-time violation tracking with configurable thresholds, staff alerts, detailed evidence logs, and admin commands. The system accounts for ping, lag, potions, and legitimate abilities, defaulting to alerts or temporary restrictions rather than automatic bans. Optimized for minimal performance impact with configurable settings for full customization.
  1. Create the Paper 1.21.11 / Java 25 plugin skeleton and conservative configuration.

  2. Implement low-overhead movement, combat, block, and inventory checks with violation tracking and evidence.

  3. Add staff/admin commands and installation notes; keep automatic bans disabled.

Created KodariAC for Paper 1.21.11 / Java 25 with configurable movement, combat, block, and inventory checks; violation tracking, staff alerts, async evidence logging, and /kac admin commands. Suspicious movement and invalid inventory transactions can be blocked. Automatic bans are disabled; heuristic detections generate evidence and alerts for staff review.

Some limits are important: Bukkit events don’t expose raw packet traffic or a reliable critical-hit flag. Packet checks therefore catch only anomalies visible through gameplay events, and the critical check is limited to attacks during sustained suspicious hovering. Tune checks if other plugins alter movement, combat, or block behavior.

Install: Compile the project in Kodari and download the successful build, put the JAR in the server’s plugins folder, then restart Paper. Review plugins/KodariAC/config.yml; reload changes with /kac reload.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
9 876
src/main/java/com/kodari/anticheat/KodariACPlugin.java
package com.kodari.anticheat;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class KodariACPlugin extends JavaPlugin {
    private final Map<UUID, PlayerData> playerData = new HashMap<>();
    private final Map<UUID, Boolean> alertPreferences = new HashMap<>();
    private ExecutorService evidenceWriter;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        evidenceWriter = Executors.newSingleThreadExecutor(task -> {
            Thread thread = new Thread(task, "KodariAC-Evidence");
            thread.setDaemon(true);
            return thread;
        });
        Bukkit.getPluginManager().registerEvents(new CheckListener(this), this);
        getCommand("kac").setExecutor(new AntiCheatCommand(this));
        Bukkit.getScheduler().runTaskTimer(this, this::decayViolations, 20L, 20L);
        getLogger().info("KodariAC enabled. Enforcement is alert-only; automatic bans are disabled.");
    }

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

    public PlayerData data(Player player) {
        return playerData.computeIfAbsent(player.getUniqueId(), ignored -> new PlayerData());
    }

    public void removeData(Player player) {
        playerData.remove(player.getUniqueId());
        alertPreferences.remove(player.getUniqueId());
    }

    public void clearData(Player player) {
        playerData.remove(player.getUniqueId());
        data(player);
    }

    public boolean alertsEnabled(Player player) {
        return alertPreferences.getOrDefault(player.getUniqueId(), true);
    }

    public boolean toggleAlerts(Player player) {
        boolean enabled = !alertsEnabled(player);
        alertPreferences.put(player.getUniqueId(), enabled);
        return enabled;
    }

    public Map<String, Double> violations(Player player) {
        return data(player).getViolations();
    }

    public void flag(Player player, String check, String evidence, double amount) {
        if (player.hasPermission("kodariac.bypass")) {
            return;
        }
        PlayerData data = data(player);
        double level = data.getViolations().merge(check, amount, Double::sum);
        writeEvidence(player, check, level, evidence);

        double threshold = getConfig().getDouble("alerts.violation-threshold", 3.0);
        long now = System.currentTimeMillis();
        long lastAlert = data.getLastAlerts().getOrDefault(check, 0L);
        long cooldown = getConfig().getLong("alerts.cooldown-millis", 5000L);
        if (level < threshold || now - lastAlert < cooldown) {
            return;
        }
        data.getLastAlerts().put(check, now);
        String message = ChatColor.RED + "[KodariAC] " + ChatColor.YELLOW + player.getName()
                + ChatColor.GRAY + " failed " + ChatColor.GOLD + check
                + ChatColor.GRAY + " (VL " + String.format("%.1f", level) + "): " + evidence;
        for (Player staff : Bukkit.getOnlinePlayers()) {
            if (staff.hasPermission("kodariac.alerts") && alertsEnabled(staff)) {
                staff.sendMessage(message);
            }
        }
    }

    private void writeEvidence(Player player, String check, double level, String evidence) {
        if (!getConfig().getBoolean("evidence.enabled", true) || evidenceWriter == null) {
            return;
        }
        String fileName = getConfig().getString("evidence.file", "evidence.log");
        if (fileName == null || fileName.isBlank()) {
            fileName = "evidence.log";
        }
        Path path = getDataFolder().toPath().resolve(fileName).normalize();
        if (!path.startsWith(getDataFolder().toPath().normalize())) {
            getLogger().warning("Evidence file must be inside the plugin data folder.");
            return;
        }
        String line = Instant.now() + "\t" + player.getUniqueId() + "\t" + player.getName()
                + "\t" + check + "\t" + String.format("%.1f", level) + "\t"
                + evidence.replace('\n', ' ').replace('\r', ' ') + System.lineSeparator();
        evidenceWriter.execute(() -> {
            try {
                Files.createDirectories(path.getParent());
                Files.writeString(path, line, StandardOpenOption.CREATE, StandardOpenOption.APPEND);
            } catch (IOException exception) {
                getLogger().warning("Could not write evidence: " + exception.getMessage());
            }
        });
    }

    private void decayViolations() {
        for (PlayerData data : playerData.values()) {
            data.getViolations().replaceAll((check, level) -> Math.max(0.0, level - 0.05));
        }
    }
}