diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java index 68cbae5c7..ea388850e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/Plot.java @@ -147,15 +147,6 @@ public class Plot implements Cloneable { return this.owner != null; } - /** - * Set the owner - * - * @param player - */ - public void setOwner(final Player player) { - this.owner = player.getUniqueId(); - } - /** * Check if the player is either the owner or on the helpers list * @@ -183,6 +174,15 @@ public class Plot implements Cloneable { return this.owner; } + /** + * Set the owner + * + * @param player + */ + public void setOwner(final Player player) { + this.owner = player.getUniqueId(); + } + /** * Get the plot ID */ @@ -204,11 +204,11 @@ public class Plot implements Cloneable { */ @Override public Object clone() throws CloneNotSupportedException { - try { - return super.clone(); - } catch (final CloneNotSupportedException e) { - return null; + Plot p = (Plot) super.clone(); + if (!p.equals(this) || p != this) { + return new Plot(id, owner, settings.getBiome(), helpers, trusted, denied, settings.getAlias(), settings.getPosition(), settings.getFlags().toArray(new Flag[settings.getFlags().size()]), getWorld().getName(), settings.getMerged()); } + return p; } /**