Best auth login in history and lagg free
π
UltraAuth_God_Level_Master_AI_Plugin_Prompt.txt
txt
2588 lines
βΆ
ULTRAAUTH β GOD-LEVEL MASTER AI PLUGIN GENERATION PROMPT
Version: 1.0
Purpose: Generate a production-ready, premium Minecraft authentication/security plugin that is smoother, safer, easier to configure, and more feature-complete than typical login plugins.
======================================================================
0. CORE DIRECTIVE
======================================================================
You are an expert Minecraft/Paper plugin architect, security engineer, backend engineer, UI/UX designer, and QA engineer.
Build a complete authentication plugin named UltraAuth.
The plugin must be:
- production-ready
- secure by default
- smooth and fast
- beginner-friendly
- highly configurable
- modular
- crash-resistant
- database-backed
- compatible with the target Paper/Minecraft API actually selected
- respectful of other plugins
- optimized for large servers
- easy to install and configure
- easy to extend with addons
- professional enough to sell as a premium marketplace plugin
Do not create a fake/demo implementation.
Do not leave TODOs for core functionality.
Do not omit important error handling.
Do not hard-code player-facing messages.
Do not claim support for APIs that do not actually exist.
If a requested Minecraft feature differs between versions, implement the correct version-specific adapter and provide a fallback.
======================================================================
1. TARGET PLATFORM
======================================================================
Primary target:
- Paper
- modern Minecraft 1.21.x
- Java version required by the selected Paper release
Support version abstraction where practical.
Use:
- Paper/Bukkit API
- Adventure/MiniMessage
- Persistent storage
- PlaceholderAPI integration as optional
- Vault integration as optional
- ProtocolLib only when genuinely necessary and safely optional
Never make ProtocolLib mandatory unless the implementation truly requires it.
The plugin must detect unsupported APIs and gracefully fall back.
======================================================================
2. PRODUCT IDENTITY
======================================================================
Plugin name:
UltraAuth
Main goal:
Provide a complete authentication, account security, session, anti-crack, premium-account, recovery, MFA, and pre-authentication isolation system.
The default experience should feel premium, modern, clean, and professional rather than overloaded.
Default branding should be easy to replace.
======================================================================
3. FIRST JOIN EXPERIENCE
======================================================================
When an unregistered player joins:
1. Detect the player.
2. Create an authentication session.
3. Prevent unauthorized gameplay.
4. Present the registration interface.
5. If the client supports modern Dialogs, show the configured registration Dialog.
6. If the client/version does not support Dialogs, use the configured fallback UI.
7. Do not expose the normal server experience before authentication.
8. Do not send unnecessary vanilla join messages before authentication.
9. Do not allow authentication bypass through movement, commands, inventory, teleportation, packet abuse, or plugin conflicts.
The default registration Dialog should communicate:
"Welcome to {server_name}"
"Create a secure account to continue."
Fields:
- Password
- Confirm Password
- Email (optional)
Main button:
"Create Account"
Secondary security button:
"More Security"
Recommended professional wording:
"More Security"
Supporting text:
"Add email recovery and two-factor authentication to further protect your account."
Do not use awkward wording such as "Add More Security".
======================================================================
4. MODERN DIALOG SYSTEM
======================================================================
Create dedicated:
dialogue.yml
Everything in the Dialog must be configurable.
Support:
- title
- body/lore
- labels
- descriptions
- placeholders
- buttons
- button order
- enabled/disabled fields
- password masking
- optional/required email
- security button
- success Dialog
- error Dialog
- confirmation Dialog
- recovery Dialog
- MFA setup Dialog
- MFA confirmation Dialog
- premium verification Dialog
Use the actual Dialog API available for the selected Minecraft/Paper version.
Never invent unsupported Dialog components.
======================================================================
5. "MORE SECURITY" BUTTON
======================================================================
This is a major feature.
The registration Dialog must have a secondary button:
"More Security"
Recommended default description:
"Protect your account with email recovery and two-factor authentication."
When clicked, open a Security Setup flow.
Security Setup must allow the player to configure:
A. Email recovery
B. MFA / 2FA
C. Security confirmation
D. Optional recovery codes
E. Optional trusted-session behavior
The server owner can enable/disable each method.
======================================================================
6. SECURITY SETUP FLOW
======================================================================
Default flow:
Registration
|
+--> More Security
|
+--> Add Email
|
+--> Enable 2FA
|
+--> Generate Recovery Codes
|
+--> Confirm Security Setup
|
+--> Done
The player may skip optional security if configuration allows.
If the server requires MFA:
- the player cannot skip it
- setup must be completed before account registration finishes
If email is optional:
- player can continue without email
If recovery codes are enabled:
- generate cryptographically secure one-time recovery codes
- hash stored recovery codes where appropriate
- never store plaintext recovery codes unnecessarily
- show them once
- strongly warn the player to save them
======================================================================
7. EMAIL SECURITY
======================================================================
Email system must support:
- optional email
- required email
- email verification
- email change
- email removal
- recovery email
- verification expiration
- resend cooldown
- email-change confirmation
- admin-controlled reset
- anti-spam rate limits
Never log passwords or email verification tokens in plaintext.
SMTP settings belong in:
email.yml
Support:
- SMTP host
- port
- username
- password
- TLS
- SSL where supported
- sender name
- sender address
- verification template
- recovery template
- security alert template
Do not expose SMTP credentials in normal player-facing output.
======================================================================
8. MFA / 2FA
======================================================================
Implement proper MFA.
Preferred standard:
TOTP compatible with common authenticator applications.
Support:
- secret generation using cryptographically secure randomness
- QR setup where practical
- manual secret entry
- verification code
- clock tolerance configuration
- backup/recovery codes
- enable/disable
- re-enrollment
- admin reset
- rate limiting
- brute-force protection
Do not implement fake "2FA" that simply sends a predictable code.
Do not store TOTP secrets in plaintext if secure encryption at rest is available/configured.
Use a secure encryption/key-management strategy and clearly document it.
======================================================================
9. MFA SETUP EXPERIENCE
======================================================================
Security setup Dialog:
Title:
"Protect Your Account"
Description:
"Add two-factor authentication to require an additional verification code when logging in."
Button:
"Set Up 2FA"
Optional button:
"Skip for Now"
If configured as required:
do not show Skip.
After secret generation:
"Scan the QR code with your authenticator app, then enter the 6-digit verification code."
Buttons:
"Verify & Enable"
"Cancel"
After successful setup:
"Two-factor authentication is now enabled for your account."
Button:
"Continue"
======================================================================
10. CONFIRMATION SYSTEM
======================================================================
Security changes must support confirmation.
Require confirmation for:
- enabling MFA
- disabling MFA
- changing email
- removing email
- changing password
- disabling security protections
- account recovery
- administrator reset when configured
Confirmation methods can include:
- password
- current MFA code
- email verification
- recovery code
The exact requirements must be configurable.
======================================================================
11. PASSWORD SYSTEM
======================================================================
Passwords can be any normal string within configured length limits.
However, block weak/common passwords.
Create:
blocked_passwords.yml
Allow administrators to add custom blocked passwords.
Default examples may include common weak passwords such as:
- 123456
- 12345678
- password
- password123
- qwerty
- qwerty123
- admin
- admin123
- minecraft
- 11111111
Do not pretend this list alone makes passwords secure.
Password policy must support:
- minimum length
- maximum length
- minimum character classes
- blocked passwords
- blocked patterns
- username similarity detection
- server-name similarity detection
- repeated-character detection
- common-password detection
All configurable.
Never store plaintext passwords.
Use a modern adaptive password hashing algorithm such as Argon2id when the runtime/dependencies allow it.
Provide a safe fallback only when necessary and document it.
Never use plain SHA-256 as a password database.
Never log passwords.
======================================================================
12. PASSWORD CONFIRMATION
======================================================================
Registration requires:
Password
Confirm Password
If mismatch:
Title:
"Passwords Don't Match"
Message:
"The passwords you entered are different. Please enter the same password in both fields."
Button:
"Try Again"
No account should be created until confirmation succeeds.
======================================================================
13. LOGIN SYSTEM
======================================================================
Registered non-premium player:
Login Dialog:
"Welcome Back"
"Enter your password to continue."
Password field:
"Password"
Button:
"Login"
If MFA enabled:
after correct password:
"Two-Factor Verification"
"Enter the verification code from your authenticator app."
Code input:
"6-digit code"
Button:
"Verify"
Recovery option:
"Use Recovery Code"
======================================================================
14. PREMIUM ACCOUNT / CRACK PROTECTION
======================================================================
Implement an optional premium-account verification system.
Important:
Do not falsely claim to verify ownership merely from a username.
The system must use legitimate Minecraft authentication/session verification mechanisms where available and permitted.
Support:
- premium account detection
- premium verification
- premium auto-login where safely verified
- offline/cracked account protection
- premium username spoof protection
- premium status caching with safe expiration
- configurable behavior for failed verification
Config:
premium.yml
Modes:
AUTO
REQUIRE
DISABLED
Never allow a player to impersonate a verified premium account simply by using its name.
If premium verification cannot be completed, fall back according to configuration.
======================================================================
15. SESSION SYSTEM
======================================================================
Support secure sessions.
Features:
- session timeout
- IP/session binding option
- device/session identification
- reconnect session
- remember login
- maximum session lifetime
- idle expiration
- session revocation
- logout-all command
- admin session invalidation
Avoid unsafe permanent sessions.
Use secure random session tokens.
Never store raw session tokens if avoidable; hash them.
======================================================================
16. ANTI-BRUTE-FORCE
======================================================================
Implement:
- per-player attempt limits
- per-IP attempt limits
- progressive delays
- temporary account lock
- IP throttling
- suspicious login detection
- configurable lock duration
- admin unlock
- security logging
Example:
1st failure: normal
2nd: short delay
3rd: longer delay
4th: longer delay
5th+: temporary lock
Never permanently lock an account solely from arbitrary unauthenticated IP reports.
======================================================================
17. RATE LIMITING
======================================================================
Rate-limit:
- login attempts
- registration attempts
- password changes
- MFA attempts
- recovery attempts
- email verification requests
- security setup requests
- admin-sensitive operations
All limits configurable.
======================================================================
18. ACCOUNT RECOVERY
======================================================================
Support recovery using configured methods:
- verified email
- recovery code
- administrator reset
Recovery must be strongly protected against account takeover.
Do not allow:
"/resetpassword player"
to bypass security merely because a player knows a username.
Admin reset must require a permission and optionally an explicit confirmation.
======================================================================
19. ADMIN PASSWORD RESET
======================================================================
This is mandatory.
Commands:
/ultraauth admin resetpassword
/ultraauth admin resetmfa
/ultraauth admin resetemail
/ultraauth admin unlock
/ultraauth admin logout
/ultraauth admin security
Require strong permissions.
Example permissions:
ultraauth.admin
ultraauth.admin.resetpassword
ultraauth.admin.resetmfa
ultraauth.admin.resetemail
ultraauth.admin.unlock
ultraauth.admin.security
Never display the old password.
Password reset should generate a secure reset workflow rather than exposing passwords.
======================================================================
20. AUTHENTICATION ISOLATION / LIMBO-LIKE EXPERIENCE
======================================================================
Before authentication, make the player effectively isolated from the normal server.
Goals:
- no gameplay
- no damage
- no item interaction
- no inventory interaction
- no normal command access
- no chat access except allowed auth commands
- no teleport abuse
- no block interaction
- no entity interaction
- no pickup
- no dropping
- no placing
- no breaking
- no combat
- no movement exploitation
- no GUI exploitation
Do not destroy the player's world or inventory.
======================================================================
21. VOID / VISUAL ISOLATION
======================================================================
Provide an optional pre-auth visual isolation mode.
Possible modes:
HIDE_WORLD
LIMBO_WORLD
BLANK_WORLD
ORIGINAL_WORLD
Preferred safe default:
HIDE_WORLD or dedicated limbo mechanism.
If using a dedicated authentication world:
- keep it unloaded/isolated where possible
- avoid expensive world generation
- prevent access to normal world chunks
- return player to original location after successful authentication
If using packet-level hiding:
- do not corrupt client state
- restore cleanly after authentication
The goal is:
"Player sees an intentionally minimal authentication environment."
Do not literally force coordinates to 0,0,0 if that creates teleportation or plugin compatibility problems. Make the authentication location configurable.
======================================================================
22. AUTH LOCATION
======================================================================
Create:
worlds.yml
Support:
auth-world:
enabled: true
world: "ultraauth"
x: 0.5
y: 100
z: 0.5
yaw: 0
pitch: 0
On authentication:
return to saved location.
Save:
- world
- X/Y/Z
- yaw
- pitch
- gamemode where appropriate
- flight state
- relevant player state
Do not lose player location because of a server crash.
======================================================================
23. JOIN MESSAGE CONTROL
======================================================================
Allow:
messages.yml
join:
authenticated: true
unauthenticated: false
The plugin must not produce duplicate join messages.
If another plugin controls join messages, avoid fighting it.
======================================================================
24. COMMAND CONTROL
======================================================================
Unauthenticated players should only have access to explicitly allowed commands.
Default allowed:
/login
/l
/register
/reg
/2fa
/recover
/email
/ultraauth
Block everything else.
Whitelist must be configurable.
Never block:
- console
- permitted plugin internal operations
- server shutdown/restart operations
- legitimate admin operations when configuration allows
======================================================================
25. AUTH COMMANDS
======================================================================
Implement:
/register
/login
/logout
/changepassword
/email add
/email verify
/email remove
/2fa setup
/2fa verify
/2fa enable
/2fa disable
/2fa recovery
/recover
/session
/ultraauth
Aliases configurable.
Never echo passwords back to chat.
======================================================================
26. CHAT SECURITY
======================================================================
Prevent passwords from appearing in:
- logs
- console
- command spy systems where possible
- command history where controllable
- plugin debug output
Because Bukkit command logging may involve other plugins, document limitations and provide safe command-based flows.
Prefer Dialogs/forms for sensitive data.
======================================================================
27. BOSSBAR
======================================================================
Create:
bossbar.yml
Support:
- login BossBar
- registration BossBar
- MFA BossBar
- recovery BossBar
- timeout BossBar
- title
- color
- overlay
- progress
- dynamic color
- animation
- visibility
- update interval
Example:
login:
title: "π Login required β’ {remaining_seconds}s"
color: YELLOW
style: SOLID
progress: true
Never use unsupported BossBar colors.
======================================================================
28. XP BAR TIMER
======================================================================
Create:
xpbar.yml
Support:
- enabled
- progress timer
- remaining seconds as level
- elapsed mode
- static mode
- update interval
Example:
level:
enabled: true
format: "{remaining_seconds}"
Save and restore the player's real XP.
Never permanently overwrite XP.
======================================================================
29. ACTIONBAR
======================================================================
Create:
actionbar.yml
Support:
- login
- register
- MFA
- recovery
- warning
- cooldown
Example:
"π Enter your password β’ {remaining_seconds}s"
======================================================================
30. TITLE / SUBTITLE
======================================================================
Create:
title.yml
Support:
- title
- subtitle
- fade-in
- stay
- fade-out
- state-specific titles
Do not spam title packets.
======================================================================
31. TIMER ENGINE
======================================================================
Create one authoritative authentication deadline.
All systems use it:
Dialog
BossBar
XPBar
ActionBar
Title
Chat countdown
Formula concept:
remaining = deadline - currentTime
Do not decrement an integer every second.
Server lag must not grant extra login time.
======================================================================
32. COOLDOWN SYSTEM
======================================================================
Create:
cooldowns.yml
Configure:
- login cooldown
- register cooldown
- MFA cooldown
- recovery cooldown
- email resend cooldown
- password change cooldown
- security setup cooldown
Progressive failure delays supported.
======================================================================
33. SOUNDS
======================================================================
Create:
sounds.yml
Configure:
- login success
- login failure
- registration success
- registration error
- MFA success
- MFA failure
- countdown warning
- timeout
- security setup
- recovery
Each sound:
- enabled
- sound
- volume
- pitch
Use actual sounds valid for the target version.
======================================================================
34. MESSAGES
======================================================================
Create:
messages.yml
Every user-facing message must be configurable.
Support:
- MiniMessage
- legacy compatibility where useful
- placeholders
- multiline messages
No hard-coded English messages in business logic.
======================================================================
35. CONFIGURATION FILE STRUCTURE
======================================================================
Create:
plugins/UltraAuth/
config.yml
messages.yml
dialogue.yml
bossbar.yml
xpbar.yml
actionbar.yml
title.yml
sounds.yml
cooldowns.yml
database.yml
security.yml
password-policy.yml
blocked_passwords.yml
premium.yml
sessions.yml
recovery.yml
mfa.yml
email.yml
commands.yml
permissions.yml
worlds.yml
integrations.yml
logging.yml
performance.yml
playerdata.yml
======================================================================
36. DATABASE
======================================================================
Support:
- SQLite
- MySQL/MariaDB
Create:
database.yml
Store:
- UUID
- username
- password hash
- registration time
- last login
- premium status
- email state
- MFA state
- MFA secret/encrypted secret
- recovery code hashes
- failed attempts
- lock status
- security metadata
- timestamps
Never store plaintext passwords.
Use migrations.
Database schema must be versioned.
======================================================================
37. PLAYERDATA
======================================================================
Create:
playerdata.yml
Use this for non-sensitive persistent per-player configuration/state where appropriate.
Do not store sensitive secrets in plain YAML.
Do not duplicate the authoritative database record unnecessarily.
======================================================================
38. SECURITY
======================================================================
Create:
security.yml
Configure:
- brute-force protection
- IP limits
- account locking
- session policy
- premium verification
- password hashing
- encryption
- recovery
- audit logs
- suspicious activity
- security alerts
- command protection
- pre-auth isolation
Security defaults must be strong.
======================================================================
39. AUDIT LOGGING
======================================================================
Create:
logging.yml
Log security events such as:
- registration
- successful login
- failed login
- MFA enabled
- MFA disabled
- email added
- email removed
- password changed
- admin reset
- account locked
- account unlocked
- recovery used
- suspicious activity
Never log:
- passwords
- MFA codes
- recovery codes
- raw session tokens
- private secrets
======================================================================
40. SECURITY ALERTS
======================================================================
Optional alerts:
- new IP
- new session
- password change
- email change
- MFA change
- recovery attempt
- repeated failures
Alerts can be sent to:
- player chat
- email
- console
- configured webhook integration if implemented securely
======================================================================
41. PLACEHOLDERAPI
======================================================================
Create an UltraAuth PlaceholderAPI expansion.
Examples:
%ultraauth_status%
%ultraauth_authenticated%
%ultraauth_registered%
%ultraauth_premium%
%ultraauth_mfa_enabled%
%ultraauth_email_verified%
%ultraauth_remaining_seconds%
%ultraauth_attempts%
%ultraauth_lock_status%
%ultraauth_last_login%
%ultraauth_session_active%
Also provide internal MiniMessage placeholders:
{player}
{uuid}
{server_name}
{remaining_seconds}
{remaining_minutes}
{attempts}
{attempts_remaining}
{cooldown_seconds}
{auth_status}
{premium}
{mfa_enabled}
{email_verified}
======================================================================
42. ADDON API
======================================================================
Provide a stable public API.
Allow addons to:
- register authentication providers
- register MFA providers
- register recovery providers
- listen to authentication events
- listen to registration events
- add security checks
- add UI components
- add placeholders
- add commands
- add account metadata
- query authentication state
Events:
PlayerAuthStartEvent
PlayerLoginEvent
PlayerLoginFailEvent
PlayerRegisterEvent
PlayerLogoutEvent
PlayerAuthTimeoutEvent
MfaSetupEvent
MfaVerifyEvent
PasswordChangeEvent
SecurityChangeEvent
RecoveryEvent
Events must be documented.
======================================================================
43. PLUGIN COMPATIBILITY
======================================================================
Integrate safely with:
- PlaceholderAPI
- Vault
- LuckPerms
- Multiverse
- WorldGuard
- ProtocolLib if installed
- common permission plugins
Optional dependencies must not prevent startup.
Detect conflicts where possible.
Do not aggressively cancel other plugins' legitimate events after authentication.
======================================================================
44. PERFORMANCE
======================================================================
Never perform database queries synchronously on the main server thread unless absolutely unavoidable and proven safe.
Use:
- async database operations
- bounded executors
- caching
- prepared statements
- connection pooling where appropriate
- minimal packet traffic
- one timer engine
- efficient player session maps
Avoid:
- one task per player per second
- repeated config parsing
- repeated database reads
- unnecessary PlaceholderAPI expansion
- packet spam
======================================================================
45. CRASH RECOVERY
======================================================================
On:
- server restart
- plugin reload
- player disconnect
- database reconnect
- exception
- timeout
cleanly terminate authentication sessions.
Never leave players permanently frozen.
If a player is authenticated and the plugin crashes/restarts:
- fail safely
- avoid corrupting data
- require reauthentication according to session policy
======================================================================
46. RELOAD
======================================================================
Command:
/ultraauth reload
Reload configurable files safely.
Do not reload:
- database schema destructively
- active password hashes
- live player records incorrectly
If configuration is invalid:
- show exact file
- show exact path
- show invalid value
- use safe fallback
- do not crash
======================================================================
47. ADMIN GUI / MANAGEMENT
======================================================================
Optional admin GUI:
/ultraauth admin
Features:
- search player
- account status
- premium status
- MFA status
- email status
- lock status
- failed attempts
- last login
- reset password
- reset MFA
- reset email
- unlock
- logout
- invalidate sessions
Never display:
- password hash
- MFA secret
- recovery codes
- session tokens
======================================================================
48. SECURITY STATUS
======================================================================
Command:
/ultraauth security
Display:
- password configured
- email verified
- MFA enabled
- recovery codes configured
- session state
- account security score
Example:
"Account Security"
"Password ........ Protected"
"Email ........... Verified"
"2FA ............. Enabled"
"Recovery Codes ... Configured"
Make this configurable.
======================================================================
49. SECURITY SCORE
======================================================================
Optional configurable score:
Password: 40
Email: 20
MFA: 30
Recovery codes: 10
Maximum:
100
Do not call it mathematically secure; call it a configurable security status/score.
======================================================================
50. PASSWORD CHANGE
======================================================================
Require:
- old password
- new password
- confirmation
If MFA enabled, optionally require MFA.
After successful password change:
- invalidate old sessions according to configuration
- notify player
- optionally email security alert
======================================================================
51. EMAIL CHANGE
======================================================================
Changing email must require configured confirmation.
Possible flow:
Current authentication
β security confirmation
β new email
β verification
β confirmation
β email updated
Never immediately trust an unverified new email.
======================================================================
52. MFA DISABLE
======================================================================
Disabling MFA must be harder than enabling it.
Default:
Password
+
current MFA code
Optional:
email confirmation
If recovery code is used, log the security event.
======================================================================
53. RECOVERY CODES
======================================================================
Generate multiple high-entropy one-time codes.
Example display format:
ABCD-EFGH-IJKL
Never use predictable sequential codes.
Store hashes.
After one is used:
- mark it consumed
- never allow reuse
Admin must not be able to view existing recovery codes.
======================================================================
54. ACCOUNT LOCKING
======================================================================
States:
ACTIVE
LOCKED
SUSPENDED
PENDING_VERIFICATION
Lock reasons:
- brute force
- admin
- security action
Show generic messages to avoid account enumeration where appropriate.
======================================================================
55. ACCOUNT ENUMERATION PROTECTION
======================================================================
Do not reveal sensitive account existence information to arbitrary users.
Examples:
Avoid:
"This username has no account."
Prefer configurable generic responses where security requires it.
======================================================================
56. USERNAME / UUID IDENTITY
======================================================================
Use UUID as the primary player identity.
Never rely solely on username.
Handle username changes safely.
Premium verification must bind to the correct legitimate identity.
======================================================================
57. PASSWORD RESET WORKFLOW
======================================================================
Preferred player recovery:
/recover
Then:
- email verification
- recovery code
- security confirmation
Generate short-lived reset tokens.
Never put raw password reset tokens into server logs.
======================================================================
58. ADMIN RESET WORKFLOW
======================================================================
Admin:
/ultraauth admin resetpassword
System:
1. Verify permission.
2. Ask for confirmation.
3. Generate reset process.
4. Invalidate sessions if configured.
5. Require player to establish a new password.
6. Audit log event.
Do not show or generate a plaintext permanent password in console by default.
======================================================================
59. LOGIN TIMEOUT
======================================================================
Configurable timeout.
Example:
60 seconds.
On timeout:
- remove authentication UI
- disconnect player or apply configured action
- save safe state
- log timeout if enabled
Possible actions:
KICK
RETURN_TO_AUTH
LOCK_TEMPORARILY
Default:
KICK
Professional default message:
"Authentication timed out. Please reconnect and try again."
======================================================================
60. PRE-AUTH PLAYER VISIBILITY
======================================================================
Optional:
- hide unauthenticated players from authenticated players
- hide authenticated players from unauthenticated players
- prevent interaction between auth sessions
- hide entities
- suppress unnecessary effects
Must be configurable and efficient.
======================================================================
61. INVENTORY PROTECTION
======================================================================
Before authentication:
- no inventory interaction
- no item movement
- no item pickup
- no item drop
- no crafting
- no container access
After authentication:
restore normal behavior.
Never delete items.
======================================================================
62. MOVEMENT PROTECTION
======================================================================
Configurable:
- freeze player
- allow camera movement
- allow limited movement inside auth area
Prevent:
- escaping auth area
- teleport exploits
- vehicle exploits
- piston/explosion damage
- portal exploits
======================================================================
63. WORLD PROTECTION
======================================================================
Authentication environment must not allow:
- griefing
- block placement
- block breaking
- explosions
- mob attacks
- PvP
- environmental damage
======================================================================
64. ANTI-BYPASS
======================================================================
Test bypass attempts involving:
- death
- respawn
- reconnect
- teleport
- commands
- plugin commands
- vehicles
- portals
- spectator
- gamemode
- inventory
- chat
- tab completion
- packets
- malformed input
- rapid command spam
======================================================================
65. INPUT VALIDATION
======================================================================
Validate:
- password length
- password encoding
- email syntax
- MFA code format
- command arguments
- usernames
- configuration values
Prevent:
- null values
- excessive input
- malicious formatting
- oversized strings
- SQL injection
- path traversal
- unsafe deserialization
Use prepared SQL statements.
======================================================================
66. DATA PRIVACY
======================================================================
Provide:
- data minimization
- secure deletion
- configurable retention
- account deletion
- audit retention settings
Do not collect unnecessary player data.
======================================================================
67. DATA DELETION
======================================================================
Admin command:
/ultraauth admin delete
Require:
- strong permission
- confirmation
- optional secondary confirmation
Delete configured account data safely.
Do not delete Minecraft player data outside UltraAuth.
======================================================================
68. DATABASE BACKUP SAFETY
======================================================================
Never automatically expose database credentials.
Support safe backup/export where practical.
SQLite:
- safe connection handling
- migration system
MySQL/MariaDB:
- reconnect
- timeout
- pool size
- SSL configuration where supported
======================================================================
69. MULTI-SERVER OPTION
======================================================================
Architecture should allow future proxy/multi-server authentication integration.
But the default plugin must work perfectly on a single Paper server.
Do not require a proxy.
======================================================================
70. CONFIG FILE QUALITY
======================================================================
Every YAML file must contain:
- config-version
- comments
- examples
- safe defaults
- valid option values
Example:
config-version: 1
enabled: true
Do not create invalid YAML.
======================================================================
71. FULL CONFIGURABILITY
======================================================================
Everything reasonably customizable must be configurable:
- messages
- colors
- titles
- lore
- Dialog fields
- buttons
- sounds
- timers
- cooldowns
- permissions
- commands
- aliases
- security rules
- password rules
- blocked passwords
- premium mode
- MFA policy
- email policy
- recovery policy
- session policy
- database
- world
- isolation
- logging
- performance
Do not turn configuration into an unreadable mess.
Use sensible defaults.
======================================================================
72. COMMAND PERMISSIONS
======================================================================
Create:
permissions.yml
Document permissions such as:
ultraauth.admin
ultraauth.admin.reload
ultraauth.admin.resetpassword
ultraauth.admin.resetmfa
ultraauth.admin.resetemail
ultraauth.admin.unlock
ultraauth.admin.logout
ultraauth.admin.delete
ultraauth.admin.security
ultraauth.admin.testui
======================================================================
73. TEST UI
======================================================================
Provide:
/ultraauth testui register
/ultraauth testui login
/ultraauth testui security
/ultraauth testui mfa
Permission:
ultraauth.admin.testui
Must not modify account data.
======================================================================
74. PLACEHOLDER UPDATE SYSTEM
======================================================================
Avoid expensive placeholder calculations.
Cache static values.
Update timers once per second unless configuration requires otherwise.
Never create a repeating task for every player if a shared scheduler can handle all sessions.
======================================================================
75. UI RESTORATION
======================================================================
When authentication ends, restore:
- XP
- XP level
- XP progress
- visibility
- location
- inventory state
- gamemode
- flight
- effects if temporarily modified
- titles/actionbars where practical
- BossBars created by UltraAuth
Do not remove unrelated BossBars from other plugins.
======================================================================
76. SOUND / UI CLEANUP
======================================================================
On authentication completion:
- remove UltraAuth BossBar
- clear UltraAuth ActionBar
- stop UltraAuth timer
- restore XP
- stop authentication UI
- restore normal player state
No duplicate UI after reconnect.
======================================================================
77. RESOURCE PACK / COSMETIC SAFETY
======================================================================
Do not require a resource pack.
If optional:
- make it configurable
- do not prevent authentication if unavailable
======================================================================
78. ANTI-CRASH DESIGN
======================================================================
The plugin must survive:
- invalid player input
- database outage
- malformed YAML
- missing optional dependencies
- unsupported client features
- plugin reload
- player disconnect during MFA
- server shutdown during registration
- concurrent login attempts
Never allow an exception to crash the main server thread.
======================================================================
79. CONCURRENCY
======================================================================
Authentication state must be thread-safe.
Never perform unsafe Bukkit API operations asynchronously.
Database operations may run asynchronously.
Return to main thread before using APIs that require it.
Prevent race conditions such as:
- double registration
- simultaneous login
- simultaneous recovery
- duplicate MFA setup
- duplicate email verification
======================================================================
80. AUTH STATE MACHINE
======================================================================
Use explicit states:
NONE
REGISTERING
SECURITY_SETUP
AWAITING_EMAIL
MFA_SETUP
AWAITING_LOGIN
AWAITING_MFA
RECOVERY
AUTHENTICATED
LOCKED
TIMED_OUT
Transitions must be validated.
Do not allow illegal state transitions.
======================================================================
81. EXAMPLE AUTH FLOW
======================================================================
NEW PLAYER:
JOIN
β
Authentication session
β
Registration Dialog
β
Password
β
Confirm Password
β
More Security
β
Email optional
β
2FA optional/required
β
Recovery codes
β
Security confirmation
β
Create account
β
Success Dialog
β
Restore server experience
RETURNING PLAYER:
JOIN
β
Premium verification if enabled
β
Existing session check
β
Login Dialog
β
Password
β
MFA if enabled
β
Success
β
Restore server experience
======================================================================
82. DEFAULT "MORE SECURITY" UI
======================================================================
Use this polished default wording:
Title:
"Protect Your Account"
Body:
"Add extra protection to your account with email recovery and two-factor authentication."
Options:
"Email Recovery"
"Receive account recovery and security notifications by email."
"Two-Factor Authentication"
"Require an additional verification code when signing in."
"Recovery Codes"
"Generate one-time codes you can use if you lose access to your authenticator."
Primary button:
"Continue"
Secondary button:
"Skip for Now"
If security is required by server policy:
hide "Skip for Now".
Registration Dialog secondary button:
"More Security"
Button description:
"Add email recovery and two-factor authentication."
This wording is intentionally concise, professional, and natural.
======================================================================
83. DIALOGUE.YML SECURITY SECTION
======================================================================
Include:
security:
button:
enabled: true
text: "More Security "
description: "Add email recovery and two-factor authentication. "
dialog:
title: "Protect Your Account"
body:
- "Add extra protection to your account with email recovery and two-factor authentication. "
- ""
- "Email Recovery "
- "Receive recovery and security notifications by email. "
- ""
- "Two-Factor Authentication "
- "Require an additional verification code when signing in. "
email:
enabled: true
required: false
mfa:
enabled: true
required: false
recovery-codes:
enabled: true
buttons:
continue: "Continue "
skip: "Skip for Now "
All of this must be configurable.
======================================================================
84. EMAIL + MFA CONFIRMATION
======================================================================
After selecting security features:
If email enabled:
request email.
If email verification enabled:
send verification.
If MFA enabled:
setup TOTP.
If both:
complete both before final registration confirmation.
Final confirmation:
Title:
"Confirm Security Setup"
Body:
"Your selected security methods are ready. Confirm to protect your account."
Button:
"Confirm & Create Account"
======================================================================
85. SECURITY SETUP CANCELLATION
======================================================================
If user cancels:
- return to registration
- preserve entered data only in secure in-memory state where practical
- never write incomplete passwords to disk
- never expose secrets
If configured:
discard sensitive fields when leaving the flow.
======================================================================
86. DEFAULT LOGIN EXPERIENCE
======================================================================
Title:
"Welcome Back"
Body:
"Enter your password to continue."
Password:
"Password"
Button:
"Login"
If MFA:
"Two-Factor Verification"
Body:
"Enter the verification code from your authenticator app."
Buttons:
"Verify"
"Use Recovery Code"
======================================================================
87. ERROR UX
======================================================================
Wrong password:
"Incorrect password"
"Please check your password and try again."
Password mismatch:
"Passwords Don't Match"
"The passwords you entered are different."
Weak password:
"Choose a Stronger Password"
"This password is too easy to guess."
MFA failure:
"Invalid Verification Code"
"Check your authenticator and try again."
Rate limit:
"Too Many Attempts"
"Please wait {cooldown_seconds}s before trying again."
Timeout:
"Authentication Timed Out"
"Please reconnect and try again."
======================================================================
88. PREMIUM UX
======================================================================
If premium verification succeeds:
"Premium Account Verified"
"Your Minecraft account was securely verified. You have been signed in automatically."
Do not claim verification when it did not actually occur.
======================================================================
89. ADMIN SECURITY TOOLS
======================================================================
Include:
- account lookup
- security status
- failed attempt inspection
- lock/unlock
- password reset
- MFA reset
- email reset
- session invalidation
- account deletion
- UI testing
- configuration validation
- database status
- health status
======================================================================
90. HEALTH / DIAGNOSTICS
======================================================================
Command:
/ultraauth status
Display:
- plugin version
- server version
- Java version
- database status
- PlaceholderAPI status
- optional integration status
- active authentication sessions
- configuration status
- task health
- cache size
Do not display secrets.
======================================================================
91. METRICS
======================================================================
Optional metrics:
- registrations
- successful logins
- failed logins
- MFA usage
- premium auto-logins
- recovery usage
- average auth duration
- timeouts
Make metrics privacy-conscious and configurable.
======================================================================
92. MIGRATION
======================================================================
If importing from another auth plugin is implemented, do it through a dedicated migration system.
Never guess password hashing formats.
Never claim compatibility without verification.
Provide import validation and backup warnings.
======================================================================
93. API DOCUMENTATION
======================================================================
Generate documentation for:
- public API
- events
- services
- placeholders
- commands
- permissions
- configuration
- database
- security model
- extension points
======================================================================
94. PROJECT STRUCTURE
======================================================================
Use a clean modular architecture.
Example:
src/main/java/.../ultraauth/
UltraAuth.java
auth/
account/
password/
mfa/
email/
recovery/
premium/
session/
security/
ui/
dialogue/
bossbar/
xpbar/
commands/
listeners/
database/
storage/
cache/
placeholders/
api/
integrations/
config/
migration/
util/
Avoid one giant main class.
======================================================================
95. DATABASE ABSTRACTION
======================================================================
Create interfaces so storage can evolve.
Example conceptual services:
AccountService
AuthenticationService
PasswordService
MfaService
EmailService
RecoveryService
SessionService
SecurityService
PremiumService
AuditService
UiService
======================================================================
96. SECURITY PRINCIPLES
======================================================================
Follow:
- least privilege
- secure defaults
- defense in depth
- fail safely
- no plaintext credentials
- no secret logging
- rate limiting
- strong password hashing
- secure random generation
- input validation
- prepared SQL
- explicit authentication states
- session invalidation
- anti-enumeration where appropriate
======================================================================
97. NO FAKE SECURITY
======================================================================
Do not call something:
"ultra secure"
merely because it has a GUI.
Security claims must correspond to real implementation.
Do not:
- use predictable tokens
- use weak password hashing
- store plaintext passwords
- use fake MFA
- trust usernames as proof of premium ownership
- allow admin reset without permissions
- bypass authentication through commands
- expose secrets in logs
======================================================================
98. DEFAULT CONFIGURATION
======================================================================
The default configuration should be:
- secure
- attractive
- reasonable
- not annoying
- usable immediately after installation
Server owner should only need to configure database/email if those features are used.
======================================================================
99. CONFIG VALIDATION
======================================================================
On startup:
validate all config files.
If invalid:
print:
- file
- key
- supplied value
- expected value
- fallback
Do not hard crash the server.
======================================================================
100. FINAL TEST REQUIREMENTS
======================================================================
Before declaring the plugin complete, test:
Registration
Login
Logout
Password change
Password mismatch
Weak password
Blocked password
MFA setup
MFA login
MFA disable
Recovery code
Email verification
Email recovery
Premium verification
Session login
Session expiration
Brute force
Cooldown
Lock
Unlock
Admin reset
Admin MFA reset
Admin email reset
Database reconnect
Database migration
Player disconnect
Server restart
Plugin reload
Unsupported Dialog client
Unsupported optional dependency
XP restoration
BossBar cleanup
ActionBar cleanup
Title cleanup
World restoration
Inventory restoration
Teleport restoration
Command blocking
Command whitelist
PlaceholderAPI
Concurrent authentication
Malformed input
Malformed config
======================================================================
101. SECURITY TESTS
======================================================================
Attempt:
- SQL injection
- command injection
- oversized passwords
- oversized email
- invalid UTF-8 handling
- spam
- brute force
- session replay
- token guessing
- username spoofing
- premium spoofing
- MFA brute force
- recovery-code reuse
- expired verification token
- expired session
- concurrent login
- reconnect bypass
- teleport bypass
- death bypass
- respawn bypass
- command bypass
- tab-completion leaks
- plugin reload bypass
Fix every discovered bypass.
======================================================================
102. MARKETPLACE QUALITY
======================================================================
The final plugin should be easy to sell because it provides:
- modern Dialog UI
- optional fallback UI
- premium verification
- anti-crack protection
- strong password policy
- blocked passwords
- MFA/TOTP
- email verification/recovery
- recovery codes
- sessions
- brute-force protection
- account locking
- admin tools
- complete configurable BossBar
- XP timer
- ActionBar
- titles
- sounds
- PlaceholderAPI
- database support
- SQLite
- MySQL/MariaDB
- addon API
- extensive configuration
- performance optimization
- clean architecture
- professional defaults
- security-first design
======================================================================
103. FINAL FILE LIST
======================================================================
Generate at minimum:
UltraAuth/
βββ config.yml
βββ messages.yml
βββ dialogue.yml
βββ bossbar.yml
βββ xpbar.yml
βββ actionbar.yml
βββ title.yml
βββ sounds.yml
βββ cooldowns.yml
βββ database.yml
βββ security.yml
βββ password-policy.yml
βββ blocked_passwords.yml
βββ premium.yml
βββ sessions.yml
βββ recovery.yml
βββ mfa.yml
βββ email.yml
βββ commands.yml
βββ permissions.yml
βββ worlds.yml
βββ integrations.yml
βββ logging.yml
βββ performance.yml
βββ playerdata.yml
======================================================================
104. FINAL IMPLEMENTATION RULE
======================================================================
Build the complete plugin, not merely the configuration files.
Every listed feature must have:
- actual implementation
- validation
- error handling
- configuration
- permissions where appropriate
- tests
- documentation
Do not respond with pseudocode when production code is requested.
Do not omit classes because the project is large.
If the output is too large for one response, continue across multiple files/sections while preserving exact package names and architecture.
Never replace missing implementation with:
"TODO"
"implement this later"
"placeholder implementation"
"example only"
======================================================================
105. FINAL DEFINITION OF DONE
======================================================================
UltraAuth is complete only when:
[β] Registration works
[β] Login works
[β] Modern Dialog works on supported clients
[β] Fallback works on unsupported clients
[β] "More Security" button works
[β] Email setup works
[β] Email verification works
[β] MFA setup works
[β] TOTP verification works
[β] Recovery codes work
[β] Security confirmation works
[β] Password hashing is secure
[β] Blocked password system works
[β] Premium verification is legitimate
[β] Session system works
[β] Brute-force protection works
[β] Account locking works
[β] Admin password reset works
[β] Admin MFA reset works
[β] Admin email reset works
[β] Authentication isolation works
[β] BossBar works
[β] BossBar timer works
[β] XP timer works
[β] XP restoration works
[β] ActionBar works
[β] Title works
[β] Sounds work
[β] Cooldowns work
[β] All timers are synchronized
[β] No timer drift
[β] Database works
[β] SQLite works
[β] MySQL/MariaDB works
[β] Configuration is extensive
[β] Messages are configurable
[β] dialogue.yml controls Dialog UI
[β] PlaceholderAPI works
[β] Addon API exists
[β] Crash recovery works
[β] Reload works safely
[β] No plaintext password storage
[β] No secret logging
[β] No obvious authentication bypass
[β] No unnecessary main-thread database work
[β] No duplicate timers
[β] No stale BossBars
[β] No permanent XP corruption
[β] No player inventory loss
[β] No location loss
[β] Security changes require appropriate confirmation
[β] Default UI is professional
[β] Configuration is beginner-friendly
[β] Documentation is included
======================================================================
FINAL COMMAND
======================================================================
Now act as the lead developer and generate the complete UltraAuth plugin according to this specification.
Prioritize correctness, security, compatibility, performance, maintainability, and polished UX.
Do not sacrifice real security for flashy features.
Do not invent unsupported Minecraft APIs.
Do not hard-code user-facing content.
Do not leave unfinished core systems.
UltraAuth should feel like a polished premium authentication platform rather than a basic /login plugin.
Create the Paper 1.21.7 project foundation, config bootstrap, and plugin lifecycle.
Implement accounts, migrations, password hashing, and authentication state management.
Add registration/login flows, Dialog UI with safe chat-command fallback, and pre-auth isolation.
Add MFA, recovery, sessions, rate limits, email, premium verification, and admin security tools.
Add integrations, placeholders, complete configuration, diagnostics, and documentation.
Foundation: created the Paper project, lifecycle, and the complete configuration set.
Account security: adding the database-backed account service and lifecycle wiring next.
Account security: added asynchronous SQLite/MariaDB persistence, schema migrations, PBKDF2-HMAC-SHA256 hashing, password policy enforcement, and account lockout state.
Authentication UI: implementing the shared deadline/session state, Paper Dialog flows, fallback commands, and isolation listeners.
Account security: adding encrypted TOTP MFA, one-time recovery codes, session tokens, and the corresponding authenticated command paths.
Security flows: ensuring password/recovery hashing never executes on Paperβs main thread before wiring the remaining account-management surfaces.
Admin safeguards: adding explicit privileged reset/unlock/delete operations and password-reset enforcement without exposing secrets.Created the UltraAuth Paper 1.21.7 project foundation with:
Async SQLite/MariaDB account storage and schema migrations.
PBKDF2-HMAC-SHA256 password hashing, configurable password policy, blocked-password checks, and account lockouts.
Registration/login Paper Dialogs plus command fallback.
Shared authoritative authentication deadlines and pre-auth gameplay isolation.
Configurable messages, UI files, timers, bossbar/actionbar/title/sound configuration, and command whitelist.
Encrypted TOTP secret storage, authenticator verification, recovery-code generation/one-time consumption.
/login,/register,/logout,/2fa,/changepassword,/ultraauth reload,/ultraauth status, and core admin reset/unlock/delete commands.Basic privileged administrative password-reset-required, MFA-reset, email-reset, unlock, and account deletion operations.
The requested scope also includes SMTP delivery, legitimate premium ownership verification, persistent session-token management, PlaceholderAPI expansion, Vault/LuckPerms integrations, full audit logging, admin GUI, complete addon API/events, diagnostics, and comprehensive tests; those are not yet implemented, so this should not be treated as the complete marketplace-ready build.
package com.ultraauth;
import com.ultraauth.account.AccountService;
import com.ultraauth.account.JdbcAccountRepository;
import com.ultraauth.auth.AuthSessionManager;
import com.ultraauth.command.AuthCommand;
import com.ultraauth.config.ConfigurationManager;
import com.ultraauth.database.DatabaseManager;
import com.ultraauth.listener.AuthListener;
import com.ultraauth.mfa.MfaService;
import com.ultraauth.password.PasswordPolicy;
import com.ultraauth.password.Pbkdf2PasswordHasher;
import com.ultraauth.ui.DialogUiService;
import com.ultraauth.recovery.RecoveryService;
import org.bukkit.plugin.java.JavaPlugin;
public final class UltraAuth extends JavaPlugin {
private ConfigurationManager configurationManager;
private DatabaseManager databaseManager;
private AccountService accountService;
private AuthSessionManager authSessionManager;
private MfaService mfaService;
private RecoveryService recoveryService;
@Override
public void onEnable() {
this.configurationManager = new ConfigurationManager(this);
this.configurationManager.load();
try {
this.databaseManager = new DatabaseManager(this);
this.accountService = new AccountService(this, databaseManager, new JdbcAccountRepository(), new Pbkdf2PasswordHasher(), new PasswordPolicy(this));
this.accountService.migrate().join();
} catch (Exception exception) {
getLogger().severe("UltraAuth could not initialize its database: " + exception.getMessage());
getServer().getPluginManager().disablePlugin(this);
return;
}
this.authSessionManager = new AuthSessionManager(this);
this.mfaService = new MfaService(this, accountService);
this.recoveryService = new RecoveryService(this, accountService);
DialogUiService dialogUiService = new DialogUiService(this, accountService, authSessionManager, mfaService);
AuthCommand command = new AuthCommand(this, authSessionManager, dialogUiService, mfaService, recoveryService);
getCommand("login").setExecutor(command);
getCommand("login").setTabCompleter(command);
getCommand("register").setExecutor(command);
getCommand("register").setTabCompleter(command);
getCommand("logout").setExecutor(command);
getCommand("logout").setTabCompleter(command);
getCommand("ultraauth").setExecutor(command);
getCommand("ultraauth").setTabCompleter(command);
getCommand("2fa").setExecutor(command);
getCommand("2fa").setTabCompleter(command);
getCommand("changepassword").setExecutor(command);
getCommand("changepassword").setTabCompleter(command);
getServer().getPluginManager().registerEvents(new AuthListener(this, authSessionManager, dialogUiService), this);
authSessionManager.start();
getLogger().info("UltraAuth enabled.");
}
@Override
public void onDisable() {
if (authSessionManager != null) {
authSessionManager.shutdown();
}
if (databaseManager != null) {
databaseManager.close();
}
getLogger().info("UltraAuth disabled.");
}
public ConfigurationManager getConfigurationManager() {
return configurationManager;
}
public AccountService getAccountService() {
return accountService;
}
public MfaService getMfaService() {
return mfaService;
}
}