跳到正文

BasicAuth

作者:ALR2310

A lightweight authentication mod for offline Minecraft servers. Protect your server with password-based login/registration, no client-side mod required

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

BasicAuth

A lightweight authentication mod for offline Minecraft servers. Protect your server with password-based login/registration, no client-side mod required.

Features

  • Password-protected accounts — players must /register and /login before they can interact with the world.
  • Locked out until authenticated — players who haven’t logged in are frozen in place (or teleported to a configurable waiting area), can’t break/place blocks, interact, attack, take damage, or chat.
  • On-screen reminders — a fading on-screen subtitle nags unauthenticated players to log in or register every few seconds.
  • Login timeout — auto-kicks players who take too long to authenticate.
  • Brute-force protection — kicks after too many failed /login attempts.
  • Reconnect grace period — players who disconnect unexpectedly (crash/network drop) while logged in can reconnect from the same IP within a configurable window without needing to log in again.
  • Waiting area — optionally teleport unauthenticated players to a fixed location instead of freezing them where they joined, then return them to their last known position after logging in.
  • Admin tools — reset a player’s password, unregister an account, or list all registered accounts, right from the console or in-game.
  • Fully configurable — timeouts, password length, failed-attempt limits, and more, adjustable in-game via the Mods menu or in config/basicauth-common.toml.

Commands

Command Description
/register <password> <confirmPassword> Create an account and log in.
/login <password> Log in to an existing account.
/changepassword <old> <new> Change your password.
/logout Disconnect and clear your session.
/unregister <password> Delete your own account.
/basicauth reset <player> (Op) Reset a player’s password to a random code.
/basicauth unregister <player> (Op) Delete a player’s account.
/basicauth accounts (Op) List all registered accounts with their online status.

Configuration

All settings are available in-game via Mods → BasicAuth → Config, or by editing config/basicauth-common.toml:

Setting Default Description
loginTimeoutSeconds 60 Time before an unauthenticated player is kicked.
minPasswordLength / maxPasswordLength 3 / 64 Allowed password length.
maxFailedAttempts 5 Failed /login attempts before a kick.
gracePeriodSeconds 3600 Reconnect window after an unexpected disconnect.
waitingAreaEnabled false Teleport unauthenticated players to a fixed location.
waitingAreaDimension / X / Y / Z — Where the waiting area is.

常见问题

BasicAuth 支持哪些 Minecraft 版本?

BasicAuth 支持 Minecraft Java 版 1.20.1–26.2,共 15 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

BasicAuth 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

ALR2310 的其他作品

查看全部 →