Mineuniverse
Log in Register
Plugins

mdbc

[mdbc] - Simple MysqlDBConnection for your plugin
by tabr25
Download Claim this project
1,784 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Developer Tools

[mdbc] - Simple MysqlDBConnection for your plugin

There is many plugins that using mysql. And EACH using OWN config and connection to db. I suggest this plugin, which connection can use any other plugin.

sample use:

import me.tabr.mysqldbconnection.MDBCMain;
//+import sql u need
...
MDBCMain mdbc = (MDBCMain)this.getServer().getPluginManager().getPlugin("mdbc");
mdbc.Test();//to test =)
Statement s = mdbc.getStmt();
//and use statement as always =)

second sample use (v.0.2+ only)

import me.tabr.mysqldbconnection.MDBCMain;
...
MDBCMain mdbc = (MDBCMain)this.getServer().getPluginManager().getPlugin("mdbc");
ArrayList<ArrayList<String>> result =mdbc.executeQuery("SELECT  * FROM iConomy");
for (int i=0;i<result.size();i++)
 {
 ArrayList<String>	result1	= result.get(i);
 String out="";
 for (int j=0;j<result1.size();j++)
  {
  out+=result1.get(j)+" ";
  }
 log.info("[test] "+out);
 }

Features

  • ping mysql implementation (so connection will not lost[i think])
  • source included

Version History

  • v.0.1.1 First public beta
  • v.0.2 added ArrayList<ArrayList<String>> executeQuery and int executeUpdate methods,so u don't need include sql features and new config parameter "maxColIndex: 32". Don't fogret update config file!!!1
  • v.0.3 normally unloads depend plugins

PS: don't forget to add 'depend: [mdbc]' to your 'plugin.yml'
PPS: sorry for my english

mdbc[v.0.3]
MC CB 1.2.5-R1.2
Beta 2012-06-27 Get
mdbc v.0.1.1
MC CB 1.1-R6
Beta 2012-03-03 Get
mdbc v.0.2
MC CB 1.1-R6
Beta 2012-03-03 Get

More from tabr25

Server
5,285
DisableCraft
35,674

You Might Also Like

WorldGuard Custom Flags
WorldGuard Custom Flags
97,851
HoloAPI
Advanced and powerful holographic displays
93,959
Minequery
Minequery
91,099
SQLibrary
SQLibrary aims to streamline driver wrappers in Java for every database engine
85,675
WolfyUtilities
Utils and APIs: Config, Language and Inventory API, Protection Utils: WorldGuard, LWC, PlotSquared
84,728
DisguiseTester
Experiment with disguises!
9,677