Database manager? (DB Manager)

Would it be possible to make an API plugin (For now on to be known as DB in this thread) where plugins on a server can query DB for MySQL instead of having to put the MySQL details into 50 different plugins whereas I can just put the info into DB and then plugins can query DB for any kind of info they want.

From what I get you mean kind of a MySQL-Database login-info manager?
Yes that’s fairly simple to code.

Yes exactly like that, It would make the life of me and countless other server admins and owners easier.

I’m even able to code that with what we have right now.
Want it for Bukkit and Sponge?

I am just going to say yes, preferably open source on github

Yeah, I was going to open-source it.
I hate closed source :slight_smile:


You’ll be able to track the progress here: MrMysteri0us (Robin Bünger) · GitHub

I’ll be watching that repo closely. See what I did there? lol

1 Like

Just cloned into desktop Git, should make following the code base a little easier.

@TBotV63 You make me nervous. :smiley:
I’ll use a lib for the config, for YAML preferably, since we’re used to it.

Might as well get used to HOCON. Fairly certain that’s what the Sponge team has decided on using.

I know :frowning:
But well, this plugin will be coded for Sponge and for Bukkit so two different ML’s would be… meh.

Updated DBManager-Sponge, added a config.

Looks good so far!

1 Like

Finished DBManager-Sponge v1.0 — Warning: Testing required. Only basic functions included; No commands.

Plugins can use DBManager to have all database credentials in one place.
A config would look like this:

 database: <database>
 username: <username>
 password: <password>
 host: <host>
 port: <port>

For coders:
Let’s say you have a plugin called xcraft, you would use my DBManager.jar as library.
If you need to access the Database, you would simply use the DBManager class:

String database = dbManager.getDatabase();
String username = dbManager.getUsername();
String password = dbManager.getPassword();
String host = dbManager.getHost();
int port = dbManager.getPort();
1 Like

Updated GitHub. I guess I just posted the first ever Sponge plugin.

1 Like

I’ll probably not release it for Bukkit though, as no Bukkit-developer is going to use it anyways, since Bukkit’s dead.

I might put it into some plugins I am working on for my server, but I won’t support the bukkit one unless spigot plans to live on past 1.8

Same. I won’t develop the Bukkit one if Spigot doesn’t make it.

@MrMysteri0us Your doing bukkit now right?