Home›Java›Mods›NullPass
ModsJava

NullPass

by DeM0RG · on Modrinth

A lightweight server-side authentication mod for Minecraft NeoForge 1.21.1. NullPass protects your server with registration and login commands, securely…

⬇ Download on Modrinth

NullPass is a simple authentication mod for Minecraft servers running NeoForge 1.21.1. It requires installation on the server only: players can join with a normal compatible client and do not need to install the mod themselves.

New players must register an account, while registered players must log in before playing. Until authentication is completed, NullPass prevents the player from moving, chatting, using most commands, interacting with the world, attacking entities, or opening containers.

Passwords are never saved as plain text.

Features

Why Use NullPass?

NullPass is useful for offline-mode or private Minecraft servers where players need a password-based login layer. It keeps the authentication flow focused and configurable without requiring every player to install an extra mod.

Use it when you want to:

Base Syntax

Command Description
/register <password> <confirmPassword> Creates an account and authenticates the player.
/login <password> Authenticates a registered player.
/changepassword <oldPassword> <newPassword> Changes the password of an authenticated player.
/logout Ends the current authentication session, if enabled in the configuration.
/reg <password> <confirmPassword> Short alias for /register, if shortCommands is enabled.
/l <password> Short alias for /login, if shortCommands is enabled.

Passwords are read as single command arguments, so they cannot contain spaces.

Configuration

NullPass uses the NeoForge common configuration file. After the mod has started once, edit the generated nullpass-common.toml file in your server's config directory, then restart the server to apply changes.

Main Options

Option Default Description
shortCommands true Enables /reg and /l aliases.
sessionExpireSeconds 60 How long a normal reconnect can resume an authenticated session. Set 0 to disable remembered sessions.
requireSameIpForSession true Requires the reconnecting player to use the same IP address for session resume.
messageDisplay ACTIONBAR Where the registration/login prompt is shown: CHAT, ACTIONBAR, or BOSSBAR.
messageRepeatSeconds 3 Prompt repeat interval. Set 0 to disable repeated prompts.
allowLogoutCommand true Allows players to use /logout.
authenticationTimeoutSeconds 60 Time available to register or log in. Set 0 to disable the timeout.
maxLoginAttempts 3 Maximum incorrect /login attempts before the player is disconnected. Set 0 to disable the limit.
password.minLength 4 Minimum allowed password length.
password.maxLength 32 Maximum allowed password length.

Example

shortCommands = true
sessionExpireSeconds = 60
requireSameIpForSession = true
messageDisplay = "ACTIONBAR"
messageRepeatSeconds = 3
allowLogoutCommand = true
authenticationTimeoutSeconds = 60
maxLoginAttempts = 3

[password]
minLength = 4
maxLength = 32

Messages and Colors

Every player-facing message can be changed under the messages section. NullPass supports legacy color codes using &, for example:

[messages]
login = "&6NullPass &7| &fPlease log in: /login <password>"
wrongPassword = "&6NullPass &7| &cIncorrect password."
authenticationTimeout = "&6NullPass &7| &fYou did not authenticate."
loginAttemptsExceeded = "&6NullPass &7| &fThe maximum number of login attempts has been exceeded."

When maxLoginAttempts is enabled, a wrong-password message automatically receives a gray counter before the final failed attempt:

NullPass | Incorrect password. (1/3)
NullPass | Incorrect password. (2/3)

On the final failed attempt, the player is disconnected with the configured loginAttemptsExceeded message instead.

Installation

  1. Install NeoForge for Minecraft 1.21.1 on your server.
  2. Place the NullPass JAR in the server's mods directory.
  3. Start the server once to generate the configuration file.
  4. Edit config/nullpass-common.toml if needed.
  5. Restart the server.

Clients do not need NullPass installed.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

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

Explore more