LoginPlugin

DESCRIPTION

Minecraft... What an amazing game... Except when the server is down, and when you can't play anymore... Well, this plugin might be a solution! Whenever a player join your server, he won't be allowed to do anything if he didn't log in (using /login command).

It is using a MySQL database, and a personalised encryption process. This way, you can create a website on which people will sign in, and use the very same password to log into your Minecraft server. You can also use this plugin to let people play only if they have an account on your server. That way, you can filter players more efficiently.

DATABASE STRUCTURE
  • A Column <ColUsername>
  • A Column <ColPassword>
  • Any other column you want, as soon as you describe it in the encryption formula.

Where ColUsername contains a username, and ColPassword contains an encrypted password.

THE FORMULA THING

As everybody might want to use a different kind of encryption process, my idea was to let you the choice. Here is how it works :

You only have few functions available right now :

  • MD5, MD2 => require 1 parameter
  • SHA1, SHA256, SHA384, SHA512 => require 1 parameter
  • CONCAT => require 2 or more parameters
  • DB => require 1 parameter
  • PASS => don't require any parameter

Each function will return a String, so you can combine them together. Here are few examples :

  • MD5(PASS()) => will return a MD5 hash of the password given by the player.
  • MD5(CONCAT("salt",PASS())) => will concatenate the given password with the String "salt", and create a MD5 hash of the result
  • SHA1(CONCAT(PASS(),MD5(DB("username")))) => will create a MD5 hash of the "username" column from the database, concatenate it with the given password, and create a SHA1 hash of the result
  • And so on...

The result of this formula will be compared with the content of the <ColPassword> in the database. If it's the same String, then the player is allowed to play.

WARNING : You must be careful and you shouldn't put any space in the formula, except in the String.

TODO
  • Add SQLite database support;
  • Create a default configuration file outside of the archive.
  • Add more functions for the hash formula;
  • Associate an action on each event (login fail, login success, ...) so that the database can keep a record of it.
  • Add a /register for people who don't want to go online (op should be able to activate/deactivate it);
  • Add a /valid-request for op, to validate request for an account;
  • Add a /forgot-account command;
  • Add a /login-enable and a /login-disable command;
  • Add a /let-play command to let a player play for a certain amount of time (requires op permissions);
  • ... (any suggestions?)
COMMAND
  • /login <password> - Will try to log the player in with his pseudo and the given password.
PERMISSIONS
  • login.login
INSTALLATION
  • Download "LoginPlugin.jar" file
  • Edit "config.yml" in the LoginPlugin.jar file you've downloaded
  • Copy the archive in your "plugins/" folder
  • Restart your server
VERSIONS
  • v0.1 - first release.
  • v0.2 - Add algorithm, encryption process. Reorganize code.
NEWS

I wont be able to keep on working on this project before the end of November. I will release the source code for anyone who would like to re-use it. I'm sorry about that, but be sure I will not let it down. Cheers!

If you have any questions, please ask me! If you have any suppositions, please tell me!

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of RotaMovie RotaMovie Jul 18, 2013 at 23:49 UTC - 0 likes

    COMO ABAIXO ?

  • Avatar of NinjaXStorm NinjaXStorm Nov 22, 2012 at 02:24 UTC - 0 likes

    I forgot my password from a long time ago. i found a new server that requires this but i registered on a different server a long time ago and I don't remember it. Is there a way to reset the password? Also the server's website doesn't have a contact info.

  • Avatar of Theobalt Theobalt Sep 28, 2012 at 04:18 UTC - 0 likes

    @ShadowOfAGamer : This plugin only allow players to login with a valid, used account. But, sounds like a good idea to add an IP address checker. @a123b : I will release the source in a minute. ;) @Jake_Griffin : This is not exactly the purpose of this plugin, but it sounds interesting. I'll see if I can do something about it. @StuckingFoned : That's a good idea. I'll do that! @thomas_ruby_dragon_studios : My pleasure! :)

    I'm sorry I can't work on the plugin right now, but I should be available for it around the end of November. Sorry about that!

    Theobalt

  • Avatar of ShadowOfAGamer ShadowOfAGamer Sep 15, 2012 at 22:11 UTC - 0 likes

    Does this plugin support 1 computer at a same IP adress when you register an account?

  • Avatar of a123b a123b Aug 30, 2012 at 11:13 UTC - 0 likes

    Where can I get the source from?

  • Avatar of HairyHandsMagee HairyHandsMagee Jul 05, 2012 at 00:33 UTC - 0 likes

    Could I possible suggest a change?

    Would it be possible for you to make a /register command which [optionally] does not require a password, /login is not required and the user automatically changes PEX group? I'm not sure if there is already a plugin that does this, but I can't find it!

    Just to recap: Player logs in for the first time - in default group with only the chat permission node (Visitor). If the player wants to build etc. they type /register and it teleports them to a rules room. The player views the rules and it tells them to type /accept and they get teleported back to the spawn area as a different PermissionsEx group.

    Sorry that this is detailed or too specific, let me know if this is possible or this has been done previously!

    Thanks

  • Avatar of StuckingFoned StuckingFoned Jul 03, 2012 at 02:54 UTC - 0 likes

    Looks very promising!

    Please add seperate custom database/table/column for username and seperate for pass, to allow all kinds of setup like forum user details etc and custom logins.

    Last edited Jul 03, 2012 by StuckingFoned

    24/7 Survival & Creative - Ballz of Steel

    • Survival & Creative • Multi-World • Nether PvP • No Whitelist •
    • 99.5%+ Uptime • Small community • Forums • Online map • Professional Staff •
    • IP: play.ballzofsteel.com •

    Click here to view plugins released by me

  • Avatar of tomas_ruby_dragon_studios tomas_ruby_dragon_studios Jun 28, 2012 at 06:15 UTC - 0 likes

    thank god for this!!! XD you have saved my server!

  • Avatar of Theobalt Theobalt Jun 19, 2012 at 11:31 UTC - 0 likes

    Yep, that's it! You can use a website to manage your database. And, in a future release, you will be able to subscribe directly from your Minecraft server. But I also want admins to have the choice between automatically allow people to get an account or not. So I still have a lot of work! ;) Cheers!

  • Avatar of kkj3 kkj3 Jun 13, 2012 at 19:43 UTC - 0 likes

    Not sure if i understood it correctly, but if you have a website where you can register, you then send those credentials to a mysql database, and then you can log in with this plugin? Also for those who want to register in-game, what about using DBPassword to generate a password in-game, so the user can log in with that password?

Facts

Date created
Apr 25, 2012
Categories
Last update
Sep 28, 2012
Development stage
Beta
Language
  • enUS
  • frFR
License
GNU General Public License version 3 (GPLv3)
Curse link
LoginPlugin
Downloads
62,916
Recent files

Authors