This commit is contained in:
Jesse Boyd 2016-09-25 18:48:38 +10:00
parent 1b6d08b3fe
commit c99e23bd3c
2 changed files with 5 additions and 0 deletions

View file

@ -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<Plot> plots = area.getPlotSelectionOwned(pos1, pos2);
if (!plots.isEmpty()) {
if (!Permissions.hasPermission(player, "plots.cluster.create.other")) {

View file

@ -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"),