Configuration
Authentication Settings
# Session timeout in minutes (0 = login every time)
session-timeout: 30
# Maximum login attempts before kick
max-login-attempts: 5
# Time in seconds to login after joining (0 = unlimited)
login-timeout: 60
# Password length limits
min-password-length: 6
max-password-length: 32
# Require uppercase + lowercase + number
require-strong-password: false
# Maximum accounts per IP (0 = unlimited)
max-accounts-per-ip: 3
# Allow new registrations
allow-registration: true
# Kick unregistered players who don't register within timeout
force-registration: true
# Show last login date and IP after authentication
show-last-login: truePlayer Restrictions
While unauthenticated, players are restricted from all actions:
# Hide player from others until logged in
hide-unlogged-players: true
# Prevent movement before login (allows head rotation)
block-movement: true
# Prevent all interactions before login
block-interactions: true
# Hide quit message if player disconnects without authenticating
hide-quit-if-not-logged: true
# Commands allowed before login
allowed-commands:
- "/help"
# Teleport player to a fixed spawn on join
teleport-to-spawn: false
| Action | Behavior |
|---|---|
| Movement (walking) | Position locked, head rotation allowed |
| Chat | Blocked |
| Commands | Only /login, /register, /l, /reg, /2fa, /recover, /email, and configured allowed commands |
| Block break/place | Blocked |
| Interactions | Blocked |
| Inventory | Blocked |
| Item drop/pickup | Blocked |
| Entity damage (give/receive) | Blocked |
| Vehicle enter | Blocked |
| Portal use | Blocked |
| Teleportation (non-plugin) | Blocked |
Security
# Only allow login from the last known IP
ip-lock: false
# Temporary IP ban and rate limiting
security:
ip-ban-duration: 30 # minutes
ip-rate-limit-max: 10 # max failed attempts
ip-rate-limit-window: 10 # time window in minutes
# Notify admins on failed login
notify-on-failed-login: true
# Log all login/register events
log-events: true
# Name validation
name-validation:
enabled: true
pattern: "^[a-zA-Z0-9_]{3,16}$"
blocked-words:
- "admin"
- "moderator"
- "server"
- "console"Two-Factor Authentication (2FA)
two-factor:
enabled: false
XLogin supports TOTP (Time-based One-Time Password), compatible with Google Authenticator, Authy, and Microsoft Authenticator.
Setup for Players
- Admin enables it in config:
two-factor.enabled: true - Player runs
/2fa setup— they receive a secret key. - Player adds the key to their authenticator app.
- Player runs
/2fa <code>with the 6-digit code to confirm. - On future logins, after
/login, the player must also enter/2fa <code>.
Messages Display
# Title/subtitle shown on join
login-title:
enabled: true
login-title: "<gold><bold>Welcome back!"
login-subtitle: "<gray>Use <white>/login <password>"
register-title: "<gold><bold>Welcome!"
register-subtitle: "<gray>Use <white>/register <password> <password>"
# Boss bar countdown
login-bossbar:
enabled: true
text: "<red>Please authenticate - {time}s remaining"
color: RED
# Action bar reminder
login-actionbar:
enabled: true
login-text: "<yellow>... Use /login <password> ..."
register-text: "<yellow>... Use /register <password> <password> ..."
All messages support MiniMessage formatting.
Email Password Recovery
Players can link an email to their account and use it to recover their password if forgotten.
email-recovery:
enabled: false
smtp:
host: "smtp.gmail.com"
port: 587
username: ""
password: ""
from: "noreply@example.com"
tls: true
code-expiry: 10 # minutes
cooldown: 5 # minutes between requests
How It Works
- Player forgets their password.
- Runs
/recover <username>— XLogin sends a 6-digit code to their linked email. - Player enters
/recover <username> <code> <newpassword>— password is reset. - Player can now
/loginwith the new password.
Recovery codes are stored in memory and expire after code-expiry minutes. A cooldown prevents spam.
Bedrock
bedrock:
# Auto-login Bedrock players (authenticated via Xbox Live)
auto-login: true