mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 22:35:29 +00:00
fixes (some test cases don't pass)
This commit is contained in:
parent
e7f9030757
commit
2211a8fb24
3 changed files with 263 additions and 17 deletions
|
@ -600,7 +600,10 @@ public class PlotMain extends JavaPlugin {
|
|||
|
||||
// Use mysql?
|
||||
if (Settings.DB.USE_MYSQL) {
|
||||
DBFunc.dbManager = new SQLManager();
|
||||
|
||||
if (DBFunc.dbManager == null) {
|
||||
DBFunc.dbManager = new SQLManager();
|
||||
}
|
||||
try {
|
||||
mySQL = new MySQL(this, Settings.DB.HOST_NAME, Settings.DB.PORT, Settings.DB.DATABASE, Settings.DB.USER, Settings.DB.PASSWORD);
|
||||
connection = mySQL.openConnection();
|
||||
|
@ -620,6 +623,12 @@ public class PlotMain extends JavaPlugin {
|
|||
if (!res.next()) {
|
||||
DBFunc.createTables("mysql", false);
|
||||
}
|
||||
else {
|
||||
res = meta.getTables(null, null, Settings.DB.PREFIX + "plot_comments", null);
|
||||
if (!res.next()) {
|
||||
DBFunc.createTables("mysql", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue