rkboss95yt
📎 1 file 3,491 chars
📄
pasted-code-1786117495102.txt
txt 162 lines
▶
Create a premium-quality Minecraft Paper plugin named "BossAltDetector".

The plugin must support ALL modern Minecraft server versions from Paper 1.16.5 up to the latest Paper version (including 1.17, 1.18, 1.19, 1.20, 1.21.x) and Java 17 & Java 21.

Goal:
Develop one of the most advanced Alt Account Detection plugins possible for Minecraft servers. The target is to achieve extremely high detection accuracy (around 90% or higher whenever technically possible) while minimizing false positives.

Main Features:

• First account from an IP joins normally with no punishment.
• Save all account information into a database.
• If another account joins that appears to belong to the same player, automatically detect it.
• Use a confidence/scoring system instead of relying only on IP.

Detection Methods:

- IP Address
- IPv4 & IPv6
- VPN Detection
- Proxy Detection
- Hosting Provider Detection
- ASN Detection
- Country
- Region
- City
- Join Pattern
- Session History
- Account Switching
- Username Similarity
- Nickname Pattern
- Connection Frequency
- Join Spam Detection
- Previous Linked Accounts
- Device/Fingerprint information if available from Minecraft protocol
- Velocity/Bungee support
- Geyser/Floodgate compatibility

Rapid Account Switching:

Example:

Player joins using Account A.
Leaves.
Within 4 minutes joins using Account B.

Automatically compare all collected information.

If confidence reaches the configured threshold,
automatically punish.

The switch timer must be fully configurable.

Punishments:

Support:
- Kick
- TempBan
- Permanent Ban
- Execute Console Commands

Default:

ban %player% Alt Account

Configurable reasons.

VPN Detection:

Support multiple providers with automatic fallback.

Examples:

- ProxyCheck.io
- IPQualityScore
- IPAPI
- Custom API Support

If a player joins with a VPN after previously joining without one, continue comparing every other available signal instead of relying only on IP.

Configuration:

Everything must be configurable.

Modules:

- Alt Detection
- VPN Detection
- Proxy Detection
- Hosting Detection
- Join Spam
- Switch Detection
- Confidence Score
- Webhook
- Logging
- Database
- Cache
- Performance
- Punishments

Database:

Support:

- SQLite
- MySQL
- MariaDB

Commands:

/bossaltdetector reload
/bossaltdetector check 
/bossaltdetector history 
/bossaltdetector linked 
/bossaltdetector whitelist
/bossaltdetector info 

Permissions:

bossaltdetector.admin
bossaltdetector.reload
bossaltdetector.notify
bossaltdetector.bypass

Discord Webhook:

Send beautiful embeds including:

- Player
- UUID
- IP (optional)
- Country
- VPN Status
- Detection Score
- Triggered Checks
- Punishment
- Time

Performance:

Everything must be asynchronous.
No memory leaks.
No TPS drops.
Optimized for servers with 300+ players.

Admin INVENTORY GUI:

Create a modern INVENTORY GUI for:

- Detection History
- Linked Accounts
- Whitelist
- Punishments
- Live Detections
- Plugin Statistics

Create a complete config.yml with comments explaining every option.

The plugin should be production-ready, highly optimized, professionally coded, and easy to configure.

IMPORTANT:
Never punish a player using only one signal such as IP.
Always combine multiple detection methods to reduce false positives and maximize detection accuracy.
Kodari AI
KodariAug 7 at 3:48 pm 15
BossAltDetector
A premium alt-account detection plugin for Paper servers using a multi-signal confidence scoring system. Combines IP, VPN, proxy, ASN, geo-location, join patterns, session history, username similarity, and rapid-switch detection to identify alt accounts with high accuracy. Features async processing, SQLite/MySQL/MariaDB storage, configurable punishments, Discord webhook embeds, admin inventory GUI, and full Velocity/Bungee/Geyser support. Never punishes on a single signal, requiring configurable confidence thresholds across multiple detection methods.
  • Scaffold the Paper plugin with Java 17 compatibility and runtime database drivers.

  • Build asynchronous network enrichment, multi-signal scoring, persistence, and configurable enforcement.

  • Add commands, audit/webhook support, and an inventory-based administration panel.

  • Provide a fully documented configuration covering detection, providers, storage, performance, and punishments.

Created BossAltDetector with:

  • Async SQLite/MySQL/MariaDB persistence and hashed IP storage.

  • Multi-signal confidence scoring that requires at least two independent signals before enforcement.

  • IP/ASN/location, VPN/proxy/hosting enrichment with provider fallback and cache.

  • Rapid account-switch and username-pattern detection.

  • Configurable kick, tempban, ban, and console-command punishments.

  • Discord webhook reporting, staff notifications, audit history, whitelist support.

  • /bossaltdetector administration commands and inventory GUI.

  • Fully documented config.yml, Paper 1.16.5+ API target, and Java 17/21 compatibility.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
18 1,097
src/main/java/com/kodari/bossaltdetector/BossAltDetector.java
package com.kodari.bossaltdetector;

import com.kodari.bossaltdetector.command.BossAltDetectorCommand;
import com.kodari.bossaltdetector.database.DatabaseManager;
import com.kodari.bossaltdetector.gui.AdminGuiListener;
import com.kodari.bossaltdetector.gui.AdminGuiManager;
import com.kodari.bossaltdetector.listener.AltConnectionListener;
import com.kodari.bossaltdetector.service.AltDetectionService;
import com.kodari.bossaltdetector.service.NetworkLookupService;
import lombok.Getter;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Getter
public final class BossAltDetector extends JavaPlugin {
    private PluginSettings settings;
    private ExecutorService workerPool;
    private DatabaseManager databaseManager;
    private AltDetectionService detectionService;
    private AdminGuiManager adminGuiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.settings = new PluginSettings(this);
        this.workerPool = Executors.newFixedThreadPool(settings.getWorkerThreads(), runnable -> {
            Thread thread = new Thread(runnable, "BossAltDetector-Worker");
            thread.setDaemon(true);
            return thread;
        });
        this.databaseManager = new DatabaseManager(this);
        if (!databaseManager.initialize()) {
            getLogger().severe("Database initialization failed; disabling to prevent untracked detections.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        NetworkLookupService networkLookupService = new NetworkLookupService(this);
        this.detectionService = new AltDetectionService(this, networkLookupService);
        this.adminGuiManager = new AdminGuiManager(this);
        getServer().getPluginManager().registerEvents(new AltConnectionListener(this), this);
        getServer().getPluginManager().registerEvents(new AdminGuiListener(adminGuiManager), this);

        BossAltDetectorCommand command = new BossAltDetectorCommand(this);
        PluginCommand rootCommand = getCommand("bossaltdetector");
        if (rootCommand != null) {
            rootCommand.setExecutor(command);
            rootCommand.setTabCompleter(command);
        }
    }

    public void reloadPluginConfiguration() {
        reloadConfig();
        this.settings = new PluginSettings(this);
    }

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