Fixes to SQL

This commit is contained in:
boy0001 2014-11-12 19:09:08 +11:00
parent e6c5f824df
commit 0017b73bdb
2 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@
<groupId>com.intellectualcrafters</groupId>
<artifactId>PlotSquared</artifactId>
<version>2.3.0</version>
<version>2.3.1</version>
<name>PlotSquared</name>
<packaging>jar</packaging>
<build>

View File

@ -437,12 +437,12 @@ public class SQLManager extends AbstractDB {
p = new Plot(plot_id, user, Biome.FOREST, new ArrayList<UUID>(), new ArrayList<UUID>(), new ArrayList<UUID>(), "", PlotHomePosition.DEFAULT, null, worldname, new boolean[]{false, false, false, false});
plots.put(id, p);
}
stmt.close();
// stmt.close();
/*
* Getting helpers
*/
stmt = connection.createStatement();
// stmt = connection.createStatement();
r = stmt.executeQuery("SELECT `user_uuid`, `plot_plot_id` FROM `" + PREFIX + "plot_helpers`");
while (r.next()) {
id = r.getInt("plot_plot_id");
@ -459,12 +459,12 @@ public class SQLManager extends AbstractDB {
PlotMain.sendConsoleSenderMessage("&cPLOT " + id + " in plot_helpers does not exist. Please create the plot or remove this entry.");
}
}
stmt.close();
// stmt.close();
/*
* Getting trusted
*/
stmt = connection.createStatement();
// stmt = connection.createStatement();
r = stmt.executeQuery("SELECT `user_uuid`, `plot_plot_id` FROM `" + PREFIX + "plot_trusted`");
while (r.next()) {
id = r.getInt("plot_plot_id");
@ -481,12 +481,12 @@ public class SQLManager extends AbstractDB {
PlotMain.sendConsoleSenderMessage("&cPLOT " + id + " in plot_trusted does not exist. Please create the plot or remove this entry.");
}
}
stmt.close();
// stmt.close();
/*
* Getting denied
*/
stmt = connection.createStatement();
// stmt = connection.createStatement();
r = stmt.executeQuery("SELECT `user_uuid`, `plot_plot_id` FROM `" + PREFIX + "plot_denied`");
while (r.next()) {
id = r.getInt("plot_plot_id");
@ -503,9 +503,9 @@ public class SQLManager extends AbstractDB {
PlotMain.sendConsoleSenderMessage("&cPLOT " + id + " in plot_denied does not exist. Please create the plot or remove this entry.");
}
}
stmt.close();
// stmt.close();
stmt = connection.createStatement();
// stmt = connection.createStatement();
r = stmt.executeQuery("SELECT * FROM `" + PREFIX + "plot_settings`");
while (r.next()) {
id = r.getInt("plot_plot_id");