diff --git a/Core/src/main/java/com/plotsquared/core/database/SQLManager.java b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java index 3c530b318..63d1af450 100644 --- a/Core/src/main/java/com/plotsquared/core/database/SQLManager.java +++ b/Core/src/main/java/com/plotsquared/core/database/SQLManager.java @@ -2401,7 +2401,8 @@ public class SQLManager implements AbstractDB { addPlotTask(plot, new UniqueStatement("setPosition") { @Override public void set(PreparedStatement statement) throws SQLException { - statement.setString(1, position == null ? "" : position); + // Please see the table creation statement. There is the default value of "default" + statement.setString(1, position == null ? "DEFAULT" : position); statement.setInt(2, getId(plot)); } diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 2c47ef322..67db8a698 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -1483,7 +1483,7 @@ public class Plot { */ public void setHome(BlockLoc location) { Plot plot = this.getBasePlot(false); - if (BlockLoc.ZERO.equals(location) || BlockLoc.MINY.equals(location)) { + if (location != null && (BlockLoc.ZERO.equals(location) || BlockLoc.MINY.equals(location))) { return; } plot.getSettings().setPosition(location);