vl.ash

Create a multi-platform Minecraft authentication plugin named LeoLogin, Dev By ABDOeg, designed for Paper 1.20+, Velocity, and BungeeCord. The plugin should act as a single-jar solution with 3 roles: Standalone, Proxy, and Bridge mode. Features required: 1) Automatic premium account verification via Mojang, skipping login for original players while reserving premium names against impostors. 2) Direct access for Bedrock players (Geyser/Floodgate). 3) For cracked players, freeze them in a limbo/virtual state (block movement, chat, interactions, damage) until authenticated, with a configurable countdown timer and title alerts. 4) Support commands: /login , /register , /logout, /changepassword, /premium, and admin command /leoadmin (reload, forcelogin, unregister, changepass, stats). 5) Async BCrypt password hashing and SQLite storage. 6) Session auto-login tied to player IP.

Kodari AI
KodariOct 30 at 4:35 pm 5
LeoLogin
A multi-platform Minecraft authentication plugin supporting Paper 1.20+, Velocity, and BungeeCord in a single jar with Standalone, Proxy, and Bridge modes. Automatically verifies premium accounts via Mojang, skipping login for original players while reserving premium names against impostors. Grants direct access to Bedrock players via Geyser/Floodgate. Freezes cracked players in a limbo state blocking movement, chat, interactions, and damage until authenticated, with configurable countdown and title alerts. Includes /login, /register, /logout, /changepassword, /premium, and /leoadmin commands with reload, forcelogin, unregister, changepass, and stats. Uses async BCrypt password hashing with SQLite storage and IP-based session auto-login.
  1. Add shared async authentication, Mojang verification, BCrypt, SQLite, and IP sessions.

  2. Add Paper Standalone/Bridge behavior and commands.

  3. Add BungeeCord and Velocity proxy entrypoints, commands, and bridge synchronization.

LeoLogin is set up as a single JAR with Paper Standalone/Bridge and BungeeCord/Velocity proxy entrypoints. It includes asynchronous BCrypt hashing, SQLite accounts and IP-bound sessions, Mojang profile checks, Floodgate/Geyser detection, authentication countdowns and title alerts, the requested player and admin commands, and proxy-to-Bridge lock messaging.

For proxy deployments, install the JAR on the proxy and on each Paper backend with mode: BRIDGE; Bridge mode enforces movement and interaction restrictions on the server. Use mode: STANDALONE for a Paper-only deployment.

Premium authentication limitation: a username lookup can reserve a premium name, but it cannot prove who owns that name. LeoLogin skips authentication only when the connection supplies a UUID matching Mojang’s profile. Secure automatic premium verification alongside cracked access therefore requires a proxy authentication setup that supplies verified premium UUIDs; standalone offline-mode cannot securely provide both.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
20 1,714
src/main/java/com/abdoeg/leologin/paper/LeoLoginPlugin.java
package com.abdoeg.leologin.paper;

import com.abdoeg.leologin.core.AuthService;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.sql.SQLException;

public final class LeoLoginPlugin extends JavaPlugin {
    private AuthService authService;
    private PaperAuthManager authManager;
    private boolean bridgeMode;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        bridgeMode = getConfig().getString("mode", "STANDALONE").equalsIgnoreCase("BRIDGE");
        try {
            authService = new AuthService(getDataFolder().toPath().resolve("leologin.db").toFile(), getConfig().getInt("session-days", 14));
        } catch (SQLException exception) {
            getLogger().severe("Could not open LeoLogin SQLite database: " + exception.getMessage());
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        authManager = new PaperAuthManager(this, authService, bridgeMode);
        Bukkit.getPluginManager().registerEvents(new PaperAuthListener(authManager, bridgeMode), this);
        if (!bridgeMode) {
            PaperCommands commands = new PaperCommands(this, authManager, authService);
            for (String name : new String[]{"login", "register", "logout", "changepassword", "premium", "leoadmin"}) {
                PluginCommand command = getCommand(name);
                if (command != null) {
                    command.setExecutor(commands);
                }
            }
        } else {
            Bukkit.getMessenger().registerIncomingPluginChannel(this, PaperAuthManager.CHANNEL, authManager);
        }
        getLogger().info("LeoLogin enabled in " + (bridgeMode ? "Bridge" : "Standalone") + " mode.");
    }

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

    public void reloadSettings() {
        reloadConfig();
    }
}