heeraking
📎 1 file 1,676 chars
📄
pasted-code-1772098291091.txt
txt 91 lines
▶
Create a high-level, production-ready Minecraft alt account detection plugin for a Paper/Spigot 1.21.x server.

The plugin must:

Be written in Java.

Be optimized for performance and large SMP servers.

Detect alternate accounts using:

IP address matching

UUID tracking

Geolocation comparison (optional API support)

VPN/Proxy detection API support

Session behavior analysis (login timing patterns)

Hardware fingerprint simulation (optional heuristic-based)

Shared device detection via advanced hashing system

Core Features:

Configurable detection sensitivity levels (Low, Medium, High, Strict)

Grace period support

Whitelist system

Bypass permission node (e.g., altcheck.bypass)

Staff alert system (with clickable messages)

Discord webhook logging

MySQL + SQLite support

Async database queries (no main thread blocking)

Caching system for fast lookups

Risk scoring system (each detection method adds points)

Automatic punishment system (warn/kick/tempban/flag)

Admin INVENTORY GUI using Inventory API

Detailed logging system

Reload command support

Commands:

/altcheck 

/altreload

/altstats

/altlink  

Requirements:

Use modern Paper API

Follow clean OOP structure

Use dependency injection where possible

Separate listeners, managers, database layer, and utilities

Use CompletableFuture for async tasks

Provide a full plugin.yml

Include example config.yml

Extra:

Make the plugin modular and expandable

Include comments explaining advanced detection logic

Provide example MySQL table schema

Add protection against false positives

Ensure the plugin is secure, optimized, and suitable for competitive SMP servers.
Kodari AI
KodariFeb 26 at 9:36 am 39,231 (v2)

I’ll create a comprehensive, production-ready alt account detection plugin with advanced detection methods, risk scoring, and admin GUI.

AltDetector
Advanced alternate account detection system for Paper/Spigot servers. Features multi-layered detection including IP matching, VPN/proxy detection, session behavior analysis, device fingerprinting, and geolocation comparison. Implements risk scoring with configurable sensitivity levels, automatic punishment system, staff alerts with Discord webhook integration, and admin inventory GUI. Supports both MySQL and SQLite with async queries, intelligent caching, whitelist system, and detailed logging for competitive SMP environments.

Now I’ll continue creating the remaining files for the plugin structure:

Continuing with detection system and remaining components…

Continuing with punishment, alert, and command systems…

Now creating command classes and listeners…

Now creating listener classes and GUI system…

Now creating the GUI framework and implementation…

All files have been created for the AltDetector plugin. This is a comprehensive, production-ready alt account detection system with:

Core Features:

  • Multi-layered detection (IP matching, VPN/proxy detection, session analysis, device fingerprinting, geolocation)

  • Risk scoring system with configurable sensitivity levels

  • Automatic punishment system (alert/kick/tempban/flag)

  • MySQL and SQLite support with async queries

  • Intelligent caching system

  • Whitelist and bypass permissions

  • Grace period support

Admin Tools:

  • Interactive inventory GUI for viewing detection results

  • Commands: /altcheck, /altreload, /altstats, /altlink

  • Staff alerts with clickable messages

  • Discord webhook integration

Performance:

  • All database operations are async using CompletableFuture

  • Caching system prevents redundant checks

  • HikariCP connection pooling for MySQL

  • Optimized for large SMP servers

The plugin follows clean OOP architecture with separate managers for detection, database, caching, punishment, and alerts.

heeraking

Detect alternate accounts (alts) including:

Online-mode accounts

Offline-mode (cracked) accounts

Mixed-mode servers

Proxy-connected players and someone who tried to join with alt account then the console/the chat

Kodari AI
KodariFeb 26 at 2:09 pm 36,670 (v2)

I’ll analyze the existing structure and implement a comprehensive alt detection system for all server types.

I’ll implement comprehensive alt detection supporting online-mode, offline-mode, mixed-mode servers, and proxy-connected players with real-time console/chat notifications.

Comprehensive alt detection system implemented with support for:

Online-mode accounts - Detects and tracks Mojang-authenticated Java Edition players Offline-mode/cracked accounts - Identifies non-authenticated accounts via UUID type detection Mixed-mode servers - Handles servers with both premium and cracked players, comparing account types Proxy-connected players - Supports BungeeCord/Velocity with proper IP forwarding (configure proxy.mode in config.yml) Bedrock players - Integrates with Floodgate API to detect and track Bedrock Edition players via Geyser Real-time console alerts - Logs detailed information when players with linked alts join, including account type, risk score, and IP Real-time chat alerts - Staff with altdetector.alerts permission receive clickable notifications in-game

The system now tracks account types (JAVA_ONLINE, JAVA_OFFLINE, BEDROCK), detects UUID mismatches between online/offline modes, and provides immediate console warnings when suspicious accounts connect.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
34 2,907
src/main/java/com/example/altdetector/AltDetector.java
package com.example.altdetector;

import com.example.altdetector.alert.AlertManager;
import com.example.altdetector.cache.CacheManager;
import com.example.altdetector.command.*;
import com.example.altdetector.config.ConfigManager;
import com.example.altdetector.database.DatabaseManager;
import com.example.altdetector.detection.DetectionManager;
import com.example.altdetector.inventory.gui.GUIListener;
import com.example.altdetector.inventory.gui.GUIManager;
import com.example.altdetector.listener.PlayerJoinListener;
import com.example.altdetector.listener.PlayerQuitListener;
import com.example.altdetector.punishment.PunishmentManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AltDetector extends JavaPlugin {
    
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private CacheManager cacheManager;
    private DetectionManager detectionManager;
    private PunishmentManager punishmentManager;
    private AlertManager alertManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.configManager.loadConfig();
        
        this.cacheManager = new CacheManager(this);
        
        this.databaseManager = new DatabaseManager(this);
        this.databaseManager.initialize().thenRun(() -> {
            this.getLogger().info("Database initialized successfully");
        }).exceptionally(ex -> {
            this.getLogger().severe("Failed to initialize database: " + ex.getMessage());
            this.getServer().getPluginManager().disablePlugin(this);
            return null;
        });
        
        this.detectionManager = new DetectionManager(this);
        this.punishmentManager = new PunishmentManager(this);
        this.alertManager = new AlertManager(this);
        this.guiManager = new GUIManager();
        
        this.registerCommands();
        this.registerListeners();
        
        this.getLogger().info("AltDetector v" + this.getDescription().getVersion() + " enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.databaseManager != null) {
            this.databaseManager.shutdown();
        }
        
        if (this.cacheManager != null) {
            this.cacheManager.clear();
        }
        
        this.getLogger().info("AltDetector disabled!");
    }
    
    private void registerCommands() {
        this.getCommand("altcheck").setExecutor(new AltCheckCommand(this));
        this.getCommand("altreload").setExecutor(new AltReloadCommand(this));
        this.getCommand("altstats").setExecutor(new AltStatsCommand(this));
        this.getCommand("altlink").setExecutor(new AltLinkCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
    }
}