diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PS.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PS.java index cc2cb0ea1..59705e674 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PS.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PS.java @@ -966,18 +966,16 @@ public class PS { * * @param area the {@code PlotArea} * @param uuid the plot owner - * @return Set of plot + * @return Set of plots */ public Set getPlots(PlotArea area, UUID uuid) { - ArrayList myplots = new ArrayList<>(); + final HashSet plots = new HashSet<>(); for (Plot plot : getPlots(area)) { - if (plot.hasOwner()) { - if (plot.isOwnerAbs(uuid)) { - myplots.add(plot); - } + if (plot.hasOwner() && plot.isOwnerAbs(uuid)) { + plots.add(plot); } } - return new HashSet<>(myplots); + return Collections.unmodifiableSet(plots); } /**