Provides an alternative way to control access to a minecraft server without using a whitelist
Overview
This plugin is an alternative way to control access to a minecraft server, without using a whitelist.
This plugin is a Velocity plugin, and must be installed on your proxy!
This is NOT a plugin that adds user registration or any of that other stuff you'll find by other authentication plugins on the web. This is a simple plugin to restrict access to your server, without having to maintain a whitelist or using discord integrations and whatnot.
Features
- Password Authentication: Players must enter a password to access the server.
- One-Time Login: Optionally allows players to authenticate only once.
- Plugin granted bypass permissions: Integrates with LuckPerms to grant bypass permissions.
- Configurable Settings: Various settings can be configured through a YAML configuration file.
- Kick on Timeout: Players who fail to provide the correct password within a specified timeout are kicked from the server.
- Customizable Messages: Custom messages for kick, no password, and wrong password.
Configuration
LuckPerms is required if you want the plugin to grant bypass permissions! Install it on your Velocity Proxy!
You will need a server to function as a login server. Any minecraft server will do, but I recommend NanoLimbo, as it is extremely lightweight, and will only exist to facilitate login requests
It is recommended to set the permission node velocity.command.server
to false in your permission plugins default everyone group, otherwise players will be able to bypass the plugin!
The plugin uses a TOML configuration file (config.toml
) to manage its settings. Below are some of the configurable options, comments are included in the file:
core
loginServer
: The server where players are redirected for login.hubServer
: The main server.serverPassword
: The password required for login.oneTimeLogin
: Boolean to enable/disable one-time login. Default istrue
.
core.bypass
bypassNode
: The permission node for bypassing login.pluginGrantsBypass
: Boolean to enable/disable plugin-granted bypass. Default istrue
.disableLoginCommandOnBypass
: Boolean to disable login command if bypass is granted. Default istrue
.
core.bypass.methods
bypassMethod
: Method to grant bypass permissions. Options areuser
orgroup
.bypassGroup
: The group to add the player to ifbypassMethod
isgroup
.
core.kick
kickMessage
: Message displayed when a player is kicked.kickTimeout
: Timeout duration before a player is kicked, in seconds.
messages
noPassword
: Message displayed when no password is provided.wrongPassword
: Message displayed when the wrong password is provided.welcomeMessage
: Message to be displayed when someone joins the login server.
misc
loginCommandGrantedToEveryone
: Boolean to grant the login command to everyone. Default istrue
.loginCommandNode
: The permission node for the login command. Default isloginpassword.login
.pluginEnabled
: Boolean to enable/disable the plugin. Default istrue
.configVersion
: Version of the plugin this config file was last migrated to. Do not touch.
Installation
- LuckPerms is optional (but recommended)
- A server to act as a login server is required!
- It is recommended to negate the permission node
velocity.command.server
for all players in your permissions plugin, otherwise players will be able to bypass the plugin by directly transferring to the hub server.
- Download the plugin JAR file.
- Place the JAR file in the
plugins
directory of your Velocity server. - Start the server to generate the default configuration file.
- Edit the
config.toml
file in theplugins/LoginPassword
directory to suit your needs. - Configure
velocity.toml
by adding the login server to[servers]
table. If you wantping-passthrough = "all"
to work correctly, have only the hub server in thetry = []
array, do not add the login server to the array. The plugin will handle redirecting players to the login server. - Restart the server or run
velocity reload
to reload all plugins and apply the newvelocity.toml
. - For future changes to
config.toml
, apply the changes usingloginpassword reload
Usage
Once installed and configured, the plugin will prompt players to enter a password upon connecting to the server. Depending on the configuration, players may only need to authenticate once. Administrators can manage permissions using LuckPerms or another permissions plugin to grant or revoke bypass permissions.
I encourage you to look at NanoLimbo's settings.yml
as well, to see if there are any changes you want to make to the default join messages that appear.
Contributing
Open an issue or a pull request if you want.
License
This project is licensed under the GNU Lesser General Public License v2.1. See the LICENSE
file for details.
Misc
Logo borrowed from twemoji, CC-BY 4.0.