/authmod

Allows you to safely accept demo versions on your server.

Primary LanguageJavaApache License 2.0Apache-2.0

ATTENTION: AuthMod isn't and won't be maintained at all. Feel free to fork and do your own implementation.



AuthMod

Authmod

Server side mod which allows to register and authenticate players your Minecraft server.

curseforge page forge version java version build status bugs code smells maintainability vulnerabilities vulnerabilities

AuthMod is a server-side Minecraft mod that adds commands to register and authenticate players joining your server. The mod is an alternative to the Mojang authentication. Authmod may be a good solution if you want to authorize demo Minecraft accounts on your server. When a player joins the server, all his actions are disabled. He has to authenticate via the /login <password> command to play.

Authmod registers 4 commands to your server. Each one can be turned on/off:

  • /register <password> <confirmation> to register the player.
  • /login <password> to log into the server.
  • /logged to know whether you're logged in.
  • /changepassword <old> <new> <comfirmation> to change your password once logged.

Player data are stored in either a SQL database or a sqlite file. MariaDB and MySQL are supported at this time.

Note: If you are using MySQL 8 or higher on a Windows device, you might experience difficulties to connect to the database from the server. What fixed my issues was to run this command while logged in the database: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_database_password';

Installation

  1. Stop your Minecraft server.
  2. Go to releases and select the jar depend
  3. Add authmod-<version>.jar in the mods/ directory:
curl -L "https://github.com/chocorean/authmod/releases/download/v1.16.5-1.0.0/authmod-1.16.5-1.0.0.jar" --output path/mods/authmod.jar
  1. Now, we need to configure the mod. Run the server once to generate the configuration file at world/serverconfig/authmod-server.toml.
  2. Edit authmod-server.toml depending on your needs.
  3. Restart the server and you're all set!

For developers

Please refer to the Forge documentation for setting your development environment.

./gradlew build
# The jar file includes authmod, authmod-core, jbcrypt and the JDBC mariaDB driver
ls ./build/libs/authmod-*.jar

Internationalization

Pull requests for adding i18n are more than welcomed. See authmod-core, section Internationalisation for more details.

Releasing a new version

  1. Apply the changes on the branch whose name corresponds to the forge version (let's say you're on branch 1.16.5).
  2. We're going to create a git tag. Its name must follow the pattern v<version-of-forge>-<version-of-authmod>.
  3. Create the git tag: git tag -a v1.16.5-1.0.0 -m "Release a new version for forge 1.16.5"
  4. Push the changes git push
  5. And then push the tag: git push --tags

Contributors