darksoul8094

Create a professional Minecraft Paper/Spigot Login Security Plugin with a modern INVENTORY GUI-based authentication system.

Main Concept

Players should NOT need to type "/register" or "/login".

When a player joins for the first time, automatically open a beautiful Register INVENTORY GUI.

Register INVENTORY GUI

  • Title: "๐Ÿ” Create Your Account"
  • Modern clean Minecraft inventory INVENTORY GUI.
  • Show two input areas:

1. "Password" 2. "Confirm Password"

  • A "REGISTER" button at the bottom.
  • Players can enter their password through the INVENTORY GUI input system.
  • Password fields must hide/mask the password.
  • If passwords don't match, show a clear error message.
  • After successful registration, automatically authenticate the player.

Login INVENTORY GUI

For already registered players:

  • Automatically open the Login INVENTORY GUI when they join.
  • Title: "๐Ÿ” Login"
  • One password input field.
  • One "LOGIN" button.
  • Password must be hidden/masked.
  • Correct password โ†’ allow the player to fully enter the server.
  • Incorrect password โ†’ show an error and allow another attempt.

Security

  • Never store plaintext passwords.
  • Use BCrypt or Argon2 password hashing.
  • Never send actual passwords to Discord.
  • Block movement, commands, inventory interaction and gameplay until authentication is completed.
  • Add configurable login timeout.
  • Add configurable maximum failed login attempts.
  • Kick the player after exceeding the maximum attempts.
  • Prevent authentication bypass/relog exploits.
  • Store player UUID with authentication data.
  • Use SQLite by default, with MySQL support if possible.

Discord Logging

Add Discord Webhook support through "config.yml".

Send logs to a private Discord channel for:

  • ๐Ÿ“ New registration
  • ๐Ÿ” Successful login
  • ๐Ÿšจ Failed login
  • ๐Ÿšช Logout
  • โฑ๏ธ Login timeout
  • ๐Ÿšซ Player kicked after too many failed attempts

Each log should contain:

  • Player name
  • UUID
  • Date/time
  • Action/status
  • Failed attempt count when applicable
  • IP address only if "log-ip: true"

IMPORTANT: NEVER send or display the player's actual password in Discord logs.

Configuration

Generate a clean "config.yml" with options for:

  • Discord webhook
  • Discord logging ON/OFF
  • IP logging ON/OFF
  • Login timeout
  • Maximum login attempts
  • Messages
  • INVENTORY GUI titles
  • Database settings
  • Password hashing settings

Commands

Add admin commands: "/lsec reload" "/lsec unregister <player>" "/lsec changepassword <player>" "/lsec info <player>"

Add proper permission nodes such as: "loginsecurity.admin"

Extra Features

  • Fully configurable messages.
  • Configurable INVENTORY GUI design.
  • No unnecessary commands for normal players.
  • Prevent players from accessing the server before authentication.
  • Compatible with modern Paper versions.
  • Clean, optimized and production-ready Java code.
  • Include "plugin.yml".
  • Include all required dependencies.
  • Include complete installation/setup instructions.
  • Include a clear README explaining Discord Webhook setup and configuration.

Make the INVENTORY GUI look premium, modern and professional rather than like a basic default Minecraft menu.

Kodari AI
KodariAug 13 at 3:30 pm 3
LoginSecurityGUI
A premium Paper/Spigot login security plugin with a modern inventory GUI authentication system. Features automatic registration and login GUIs with password masking, BCrypt password hashing, configurable timeout and failed attempt limits that kick offenders. Includes SQLite/MySQL storage, Discord webhook logging for registrations, logins, failures and kicks without exposing passwords. Blocks movement, commands and gameplay until authenticated. Admin commands for reload, unregister, password changes and player info with permission support. Fully configurable via config.yml.
  1. Build the Gradle project, plugin metadata, configuration, and setup documentation.

  2. Implement SQLite/MySQL account storage, BCrypt hashing, and Discord webhook logging.

  3. Implement masked inventory authentication GUIs with registration, login, timeout, attempt limits, and admin password changes.

  4. Add authentication enforcement listeners and /lsec administration commands.

Created the complete LoginSecurity plugin project with:

  • Masked inventory keypad registration and login GUIs

  • BCrypt password hashing

  • SQLite default storage with MySQL configuration support

  • Login timeout and failed-attempt limits

  • Gameplay, movement, inventory, command, and interaction blocking

  • Discord webhook logging with optional IP logging

  • Admin commands:

    • /lsec reload

    • /lsec unregister <player>

    • /lsec changepassword <player>

    • /lsec info <player>

  • Configurable GUI titles, materials, messages, security, database, and Discord settings

  • plugin.yml, Gradle build files, dependency manifest, and detailed README.md setup instructions

darksoul8094

(update) Remove login UI and make it normal login security plugin.but make sure keep discord weblink

Kodari AI
KodariAug 14 at 2:25 am 2
  1. Remove the inventory authentication flow and switch to /register and /login.

  2. Preserve the database, BCrypt hashing, timeout/attempt limits, enforcement listeners, admin commands, and Discord webhook logging.

  3. Update configuration, plugin metadata, and README for the command-based workflow.

Updated the plugin to a normal command-based authentication system.

  • Removed all inventory GUI authentication classes and listeners.

  • Added:

    • /register <password> <password>

    • /login <password>

  • Players remain blocked from gameplay until authenticated.

  • Preserved:

    • BCrypt hashing

    • SQLite/MySQL support

    • Login timeout

    • Maximum failed-login attempts

    • Discord webhook logging

    • Optional IP logging

    • Registration, login, failed login, logout, timeout, and kick events

  • Updated /lsec changepassword <player> to securely prompt the administrator for the new password through chat.

  • Added password-change cancellation with cancel.

  • Updated config.yml, plugin.yml, and README.md.

  • Passwords are never included in Discord logs.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
README.md
settings.gradle
Code
16 1,047
src/main/java/com/kodari/loginsecurity/LoginSecurityPlugin.java
package com.kodari.loginsecurity;

import com.kodari.loginsecurity.command.LsecCommand;
import com.kodari.loginsecurity.command.AuthCommand;
import com.kodari.loginsecurity.database.Database;
import com.kodari.loginsecurity.listener.SecurityListener;
import com.kodari.loginsecurity.logging.DiscordLogger;
import com.kodari.loginsecurity.security.AuthManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class LoginSecurityPlugin extends JavaPlugin {
    private Database database;
    private DiscordLogger discordLogger;
    private AuthManager authManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        database = new Database(this);
        if (!database.initialize()) {
            getLogger().severe("Database initialization failed; disabling LoginSecurity.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        discordLogger = new DiscordLogger(this);
        authManager = new AuthManager(this, database, discordLogger);

        Bukkit.getPluginManager().registerEvents(new SecurityListener(authManager), this);

        LsecCommand command = new LsecCommand(this, authManager, database);
        getCommand("lsec").setExecutor(command);
        getCommand("lsec").setTabCompleter(command);
        AuthCommand authCommand = new AuthCommand(authManager);
        getCommand("register").setExecutor(authCommand);
        getCommand("login").setExecutor(authCommand);
        getLogger().info("LoginSecurity enabled with command authentication.");
    }

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

    public Database getDatabase() {
        return database;
    }

    public DiscordLogger getDiscordLogger() {
        return discordLogger;
    }
}