HomeJavaModslogin for 1.21.1
login for 1.21.1
ModsJava

login for 1.21.1

This project addresses the issue in version 1.21.1 of Neoforge where the mod cannot log in to the server offline.

⬇ Download on Modrinth
login for 1.21.1 — screenshot 1

Login For Minecraft

Minecraft 1.21.1 · NeoForge · Server-side only · No client installation required

Login For Minecraft is a lightweight, server-side authentication mod that provides account registration, secure login, session protection, location restoration, and player teleport requests.

It is designed for server owners who want a self-hosted authentication system without relying on external login plugins. Players do not need to install anything on their clients.


Features at a Glance


Account Authentication

Login For Minecraft provides all essential account-management commands.

Command Description
/register <password> <confirmPassword> Register a new account
/login <password> Log in to an existing account
/l <password> Short alias for /login
/logout Log out and preserve the current location
/changePassword <oldPassword> <newPassword> Change the account password
/unregister <password> Permanently unregister the account
/account View personal account information

Security Features


Smart Location Restoration

Login For Minecraft remembers where each player left the server and restores that position after their next successful login.

First Login

Players logging in for the first time are teleported to the default spawn point in the Overworld.

Returning Players

Returning players are teleported to their last saved location, including:

Player locations are saved when:

If a previously saved dimension no longer exists, the player is safely returned to the default spawn point.


Player Teleport Requests

The built-in TPA system allows players to request teleportation without requiring a separate utility mod.

Command Description
/tpa <player> Request to teleport to another player
/tpahere <player> Request that another player teleport to you
/tpaccept [player] Accept a request, optionally from a specific player
/tpdeny [player] Deny a teleport request
/tpacancel Cancel all teleport requests you have sent

TPA Behavior


Protection and Anti-Exploit Measures

Before authentication, players are placed in a restricted state:

These restrictions help prevent unauthenticated players from affecting the world or being used for mob-farm and environmental exploits.

All temporary player states are correctly restored after login or logout.


Configuration

The configuration file is generated automatically at:

config/loginforminecraft-common.toml
View the default configuration
# === Login Waiting Location ===

# true:
# Use a dedicated login dimension where unauthenticated players
# remain suspended in a void-like area and cannot interact.
#
# false:
# Use the configured dimension and coordinates below.
spawn.useLoginDimension = true

spawn.dimension = "minecraft:overworld"
spawn.x = 0.0
spawn.y = 500.0
spawn.z = 0.0
spawn.yaw = 0.0
spawn.pitch = 0.0


# === Authentication Settings ===

# Login timeout in seconds.
# Set to 0 to disable the timeout.
auth.loginTimeoutSeconds = 180

# Maximum number of failed password attempts.
auth.maxLoginAttempts = 5

# Players who must always use offline authentication.
auth.forcedOfflinePlayers = []


# === TPA Settings ===

# Enable or disable the TPA system.
tpa.enabled = true

# Teleport request lifetime in seconds.
tpa.requestTimeoutSeconds = 60

Compatibility

Requirement Details
Minecraft 1.21.1
Mod loader NeoForge
Environment Dedicated server
Client installation Not required
Additional dependencies None

Installation

  1. Install a NeoForge server for Minecraft 1.21.1.
  2. Download the Login For Minecraft JAR file.
  3. Place the JAR file in the server's mods directory.
  4. Start the server.
  5. Edit config/loginforminecraft-common.toml if customization is needed.
  6. Restart the server after changing the configuration.

When players join, they will automatically receive a registration or login prompt.

[!IMPORTANT] This mod only needs to be installed on the server. Players can connect using an unmodified Minecraft client.


Updating

Before installing a new version:

  1. Stop the server.
  2. Back up the server world, account data, and configuration.
  3. Replace the existing mod JAR.
  4. Start the server and review the console for migration or configuration messages.

Support

When reporting an issue, include:

Never include passwords, account credentials, or other sensitive information in bug reports.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more