ismesinn71-ops

Can you create me a login plugin like nlogin premium from nickuc supports proxy velocity and paper and my plugin login name PrimeLogin here nlogin premium config.yml you see i pasted for crack need to register first before can play /register password password when in register can not work and effect blind darkness when they register done when player leave and join again they need to enter passworld for command /login password done and can not work and effect blind darkness like when register when register done welcome name or cracked session and for bedrock and premium edtion no need to register and login like cracked players if crack player have suffex + can enable and disable it too you can see nlogin config here message_en.yml here i pasted have like .bd and you can research more and make sure plugin very optimized no lag server performence good and author Sinnzdev thanks and sent me a jar file

Kodari AI
KodariApr 19 at 12:57 am 16,829 (v2)

I’ll create a comprehensive authentication plugin supporting both cracked and premium players with Velocity and Paper support.

PrimeLogin
A premium authentication plugin for both cracked and premium players. Cracked players must register and login with password protection while premium (Mojang-authenticated) and Bedrock players bypass authentication automatically. Features session management, movement restrictions during auth, visual effects (blindness/darkness), multi-language support, configurable cracked player suffix, and optimized async performance for Paper and Velocity servers.

I’ll create a complete authentication system with premium/Bedrock auto-login, password security, session management, and full restrictions during authentication.

Perfect! I’ve created a comprehensive authentication plugin with all the features you requested. Here’s what’s included:

Core Features:

  • Cracked Players: Must register with /register <password> <password> and login with /login <password>

  • Premium Players: Auto-authenticated (bypasses login via online-mode or permission)

  • Bedrock Players: Auto-authenticated via Floodgate detection

  • Session System: Configurable timeout, cached sessions

  • Effects: Blindness, darkness, and slowness during unauthenticated state

  • Restrictions: Frozen movement, blocked chat/commands/interactions until authenticated

  • Security: BCrypt password hashing, max login attempts, password validation

  • Cracked Suffix: Optional suffix (like " +") for cracked players

  • Multi-language: English messages included, easily expandable

  • Performance: Async database operations, optimized listeners

Commands:

  • /login <password> - Login to your account

  • /register <password> <password> - Register a new account

  • /primelogin reload - Reload configuration (admin only)

Configuration:

  • Fully customizable in config.yml

  • Session timeout, login attempts, password rules

  • Enable/disable premium, Bedrock, effects, restrictions

  • Message customization in messages_en.yml

Database:

  • SQLite storage (no MySQL setup needed)

  • Async operations for performance

  • Stores UUIDs, usernames, hashed passwords

Note: I cannot send JAR files. To compile this:

  1. Run ./gradlew build in the project directory

  2. Find the JAR in build/libs/PrimeLogin-1.0.0.jar

The plugin is optimized for both Paper and Velocity (Paper-side implementation with proxy support via Floodgate).

ismesinn71-ops

add command changepass too and unregister and reload

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
22 1,299
src/main/java/com/sinnzdev/primelogin/PrimeLogin.java
package com.sinnzdev.primelogin;

import com.sinnzdev.primelogin.command.LoginCommand;
import com.sinnzdev.primelogin.command.PrimeLoginCommand;
import com.sinnzdev.primelogin.command.RegisterCommand;
import com.sinnzdev.primelogin.data.AuthDatabase;
import com.sinnzdev.primelogin.listener.PlayerActionListener;
import com.sinnzdev.primelogin.listener.PlayerJoinListener;
import com.sinnzdev.primelogin.listener.PlayerQuitListener;
import com.sinnzdev.primelogin.manager.AuthManager;
import com.sinnzdev.primelogin.manager.EffectsManager;
import com.sinnzdev.primelogin.manager.PremiumManager;
import com.sinnzdev.primelogin.manager.SessionManager;
import com.sinnzdev.primelogin.util.MessageUtil;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class PrimeLogin extends JavaPlugin {

    private PrimeLoginConfig configManager;
    private AuthDatabase database;
    private AuthManager authManager;
    private SessionManager sessionManager;
    private PremiumManager premiumManager;
    private EffectsManager effectsManager;
    private MessageUtil messageUtil;

    @Override
    public void onEnable() {
        long startTime = System.currentTimeMillis();
        
        saveDefaultConfig();
        saveResource("messages_en.yml", false);

        this.configManager = new PrimeLoginConfig(this);
        this.messageUtil = new MessageUtil(this);
        this.database = new AuthDatabase(this);
        
        if (!database.initialize()) {
            getLogger().severe("Failed to initialize database! Disabling plugin...");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        
        this.sessionManager = new SessionManager(this);
        this.authManager = new AuthManager(this);
        this.premiumManager = new PremiumManager(this);
        this.effectsManager = new EffectsManager(this);
        
        registerCommands();
        registerListeners();
        
        long loadTime = System.currentTimeMillis() - startTime;
        getLogger().info("PrimeLogin v" + getDescription().getVersion() + " enabled in " + loadTime + "ms");
        getLogger().info("Author: Sinnzdev");
    }

    @Override
    public void onDisable() {
        if (sessionManager != null) {
            sessionManager.clearAll();
        }
        
        if (database != null) {
            database.close();
        }
        
        getLogger().info("PrimeLogin disabled successfully!");
    }

    private void registerCommands() {
        getCommand("login").setExecutor(new LoginCommand(this));
        getCommand("register").setExecutor(new RegisterCommand(this));
        getCommand("primelogin").setExecutor(new PrimeLoginCommand(this));
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerActionListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerQuitListener(this), this);
    }

    public void reload() {
        reloadConfig();
        this.configManager = new PrimeLoginConfig(this);
        this.messageUtil = new MessageUtil(this);
    }

    public PrimeLoginConfig cfg() {
        return configManager;
    }
}