AccountAPI

655 Downloads

Language: English | German


This is an API, it does almost nothing itself. It may be required by another plugin or you may want to create a plugin which requires AccountAPI.

The API creates a database table containing UUIDs, names and hashed passwords, and makes it easy to edit the table's content. Might be useful if you're creating a web service with registration and login.

The table looks like this:

uuidnamepw
069a79f444e94726a5befca90e38aaf5Notchsome SHA-256 hash
853c80ef3c3749fdaa49938b674adae6jeb_some other SHA-256 hash
.........


Requirements

  • MySQL database


Installation and Configuration

The plugin works on Bukkit/Spigot and BungeeCord.

To install the plugin, place the jar-file in your server's plugins folder and start the server. The plugin will show an error message:

[AccountAPI] Unable to connect to database. Edit connection data in config.yml
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'accountapi'
...


That means, your MySQL connection is not working. Edit config.yml in plugins/AccountAPI/. The file looks like this:

mysql:
  host: '127.0.0.1'
  port: 3306
  user: 'root'
  pw: ''
  db: 'AccountAPI'

check-connection: true
mysql
hostEnter the domain/ip of your database host
portEnter your database port (default is 3306)
userEnter your database username
pwEnter your database password
dbEnter the name of an already existing database
check-connectionSet to true if you want the plugin to check the database connection on startup and disable itself if the connection fails. Otherwise, set to false.


API documentation


Planned features

  • Feature to auto-create an account when a player joins the first time

Suggestions are welcome


Source Code (GitHub)


Plugins using this API

None so far, contact me if you want your plugin to be linked here.


Additional informaion

  • This plugin is still in BETA. It may contain bugs.
  • You are not allowed to use the plugin for commercial purposes, for example on servers selling ingame stuff for real money. License