From c99e23bd3caf8357ba062e588d2788209c0f4589 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 25 Sep 2016 18:48:38 +1000 Subject: [PATCH] Fixes #1367 --- .../java/com/intellectualcrafters/plot/commands/Cluster.java | 4 ++++ .../src/main/java/com/intellectualcrafters/plot/config/C.java | 1 + 2 files changed, 5 insertions(+) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java index cdba5d02d..711a897ca 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java @@ -115,6 +115,10 @@ public class Cluster extends SubCommand { return false; } // Check if it occupies existing plots + if (!area.contains(pos1) || !area.contains(pos2)) { + C.CLUSTER_OUTSIDE.send(player, area); + return false; + } Set plots = area.getPlotSelectionOwned(pos1, pos2); if (!plots.isEmpty()) { if (!Permissions.hasPermission(player, "plots.cluster.create.other")) { diff --git a/Core/src/main/java/com/intellectualcrafters/plot/config/C.java b/Core/src/main/java/com/intellectualcrafters/plot/config/C.java index 0f8919c47..3c4f93b33 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -115,6 +115,7 @@ public enum C { CLUSTER_LIST_HEADING("$2There are $1%s$2 clusters in this world", "Cluster"), CLUSTER_LIST_ELEMENT("$2 - $1%s&-", "Cluster"), CLUSTER_INTERSECTION("$2The proposed area overlaps with: %s0", "Cluster"), + CLUSTER_OUTSIDE("$2The proposed area is outside the plot area: %s0", "Cluster"), CLUSTER_ADDED("$4Successfully created the cluster.", "Cluster"), CLUSTER_DELETED("$4Successfully deleted the cluster.", "Cluster"), CLUSTER_RESIZED("$4Successfully resized the cluster.", "Cluster"),