From 1b11590d60f86f046c263a411397194a7852127a Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 2 Apr 2015 22:18:08 +1100 Subject: [PATCH] Fixed setowner --- .../com/intellectualcrafters/plot/database/SQLManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java index 1eef437ee..fcdb58afe 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/database/SQLManager.java @@ -86,7 +86,7 @@ public class SQLManager implements AbstractDB { // Set timout // setTimout(); // Public final - this.SET_OWNER = "UPDATE `" + this.prefix + "plot` SET `owner` = ? WHERE `plot_id_x` = ? AND `plot_id_z` = ?"; + this.SET_OWNER = "UPDATE `" + this.prefix + "plot` SET `owner` = ? WHERE `plot_id_x` = ? AND `plot_id_z` = ? AND `world` = ?"; this.GET_ALL_PLOTS = "SELECT `id`, `plot_id_x`, `plot_id_z`, `world` FROM `" + this.prefix + "plot`"; this.CREATE_PLOTS = "INSERT INTO `" + this.prefix + "plot`(`plot_id_x`, `plot_id_z`, `owner`, `world`) values "; this.CREATE_SETTINGS = "INSERT INTO `" + this.prefix + "plot_settings` (`plot_plot_id`) values "; @@ -124,6 +124,7 @@ public class SQLManager implements AbstractDB { statement.setString(1, uuid.toString()); statement.setInt(2, plot.id.x); statement.setInt(3, plot.id.y); + statement.setString(4, plot.world); statement.executeUpdate(); statement.close(); } catch (final SQLException e) {