Bike Smp

Build a Complete Minecraft Authentication Plugin – OUT STUDIO SECURITY

Develop a fully functional, professional Minecraft Login and Registration Security plugin specifically for my server.

Server Requirements

  • Server Software: Paper
  • Minecraft Version: 1.21.11
  • Java Version: Java 21
  • Plugin Name: OUT STUDIO Security
  • Database: SQLite
  1. First-Time Player Registration

When a new player joins the server:

  1. Display an email registration screen.
  2. Ask the player to enter their email address.
  3. Send a 6-digit OTP verification code to that email.
  4. Ask the player to enter the OTP.
  5. Verify the OTP.
  6. After successful verification, display the Create Password screen.
  7. Ask the player to create a password.
  8. Display a Confirm Password screen.
  9. Ask the player to enter the same password again.
  10. If both passwords match, register the player successfully.
  1. Returning Player Login
  • Ask returning players to enter their existing password.
  • Verify their password securely.
  • Allow access only after successful authentication.
  • Do not ask them to verify their email again.
  • Provide an email-based password recovery system.
  1. Security Protection
  • BCrypt or Argon2 password hashing.
  • 6-digit email OTP.
  • OTP expiration after 5 minutes.
  • OTP resend cooldown.
  • Maximum login attempts.
  • Temporary account lockout.
  • Anti-bot protection.
  • Block movement before login.
  • Block chat and commands before login.
  • Prevent inventory interaction before login.
  • Prevent unauthorized access to server features.
  1. Email System
  • Gmail SMTP integration.
  • Custom SMTP configuration.
  • Configurable sender email.
  • Custom OTP email templates.
  • Secure email verification.
  • Never save passwords in plain text.
  1. Modern GUI Design

Create a beautiful and modern OUT STUDIO themed interface.

Registration interface:

  • Enter Email
  • Verify Email OTP
  • Create Password
  • Confirm Password
  • Registration Successful

Login interface:

  • Enter Your Password
  • Login
  • Forgot Password

Use clean messages, professional colors, and a simple user-friendly interface.

  1. Admin Commands

/outsecurity reload /outsecurity info /outsecurity unregister <player> /outsecurity reset <player>

Add proper permission nodes for administrators.

  1. Configuration

Create an editable config.yml containing:

  • SMTP host
  • SMTP port
  • SMTP username
  • SMTP password
  • OTP expiration
  • OTP resend cooldown
  • Maximum login attempts
  • Password requirements
  • Login timeout
  • Database settings
  • Custom messages
  1. Database

Use SQLite by default.

Save:

  • Player UUID
  • Minecraft username
  • Verified email
  • Securely hashed password
  • Registration status

Ensure accounts remain saved after server restarts.

  1. Compatibility
  • Must work on Paper 1.21.11.
  • Must compile using Java 21.
  • Must use the correct Paper API.
  • Must be compatible with LuckPerms.
  • Must support multiple players simultaneously.
  • Must not interfere with other server plugins.
  1. Final Deliverables

Provide:

  1. Complete Java source code.
  2. Fully compiled OUTSTUDIO-SECURITY.jar.
  3. plugin.yml.
  4. config.yml.
  5. SQLite database implementation.
  6. Installation instructions.
  7. Gmail SMTP setup instructions.
  8. Complete error handling.

IMPORTANT:

Do not provide a fake plugin or incomplete code. Build a real, working, tested Minecraft plugin. Make sure every feature works on Paper 1.21.11 with Java 21. Provide the final compiled JAR file ready to upload into the server's plugins folder.

Kodari AI
KodariNov 5 at 5:57 am 4
OutStudioSecurity
A comprehensive Minecraft authentication plugin for Paper 1.21.11 with Java 21. Features email-based registration with OTP verification, secure BCrypt password hashing, and modern GUI interfaces. Includes login protection with movement/chat/command blocking, anti-bot measures, login attempt limits with temporary lockout, and email-based password recovery via Gmail SMTP. Admin commands for reload, info, unregister, and reset with permission nodes. SQLite database storage for player UUIDs, usernames, emails, and hashed passwords. Configurable SMTP settings, OTP expiration, cooldowns, password requirements, and custom messages. Fully compatible with LuckPerms and supports multiple simultaneous players.
  1. Add the Paper plugin entry point, metadata, configuration, and required library manifest.

  2. Implement SQLite accounts, BCrypt password handling, SMTP OTP delivery, registration, login, and recovery.

  3. Add the auth GUI, pre-login protections, anti-bot throttling, admin commands, and setup instructions.

Implemented OUT STUDIO Security with SQLite accounts, BCrypt password hashes, email OTP registration and recovery, login lockouts, pre-login restrictions, an auth menu, admin commands, editable configuration, and Gmail/custom STARTTLS SMTP settings. Setup and Gmail instructions are in README.md.

Set the SMTP details in config.yml before testing email; for Gmail, use an App Password, not your regular account password. I can’t claim a live Paper-server or SMTP test from this session.

To produce the JAR in Kodari:

  1. Click Compile in the desktop top bar, or on phone tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. When it succeeds, click Download on the build or the download button in chat.

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
README.md
Code
12 1,714
src/main/java/com/outstudio/security/OutStudioSecurity.java
package com.outstudio.security;

import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.nio.file.Path;

public final class OutStudioSecurity extends JavaPlugin {
    private SecurityDatabase database;
    private EmailService emailService;
    private AuthManager authManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        try {
            String databaseFile = getConfig().getString("database.file", "security.db");
            Path configuredPath = Path.of(databaseFile);
            Path databasePath = configuredPath.isAbsolute()
                    ? configuredPath
                    : getDataFolder().toPath().resolve(configuredPath);
            database = new SecurityDatabase(databasePath);
            emailService = new EmailService(this);
            authManager = new AuthManager(this, database, emailService);
            Bukkit.getPluginManager().registerEvents(new AuthListener(this, authManager), this);

            PluginCommand command = getCommand("outsecurity");
            if (command == null) {
                throw new IllegalStateException("The outsecurity command is missing from plugin.yml");
            }
            AuthCommand authCommand = new AuthCommand(this, database, authManager);
            command.setExecutor(authCommand);
            command.setTabCompleter(authCommand);

            getLogger().info("OUT STUDIO Security enabled with SQLite storage.");
        } catch (Exception exception) {
            getLogger().severe("Could not initialize OUT STUDIO Security: " + exception.getMessage());
            exception.printStackTrace();
            Bukkit.getPluginManager().disablePlugin(this);
        }
    }

    @Override
    public void onDisable() {
        if (database != null) {
            try {
                database.close();
            } catch (Exception exception) {
                getLogger().severe("Could not close the SQLite database: " + exception.getMessage());
            }
        }
    }

    public AuthManager getAuthManager() {
        return authManager;
    }
}