From 49b19e0eaff2a1ed4c9a92a7b80e1861279ddc9d Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sat, 8 Oct 2022 15:13:11 +0200 Subject: [PATCH] Check proper locations on PortalCreateEvent (#3834) check proper locations on PortalCreateEvent --- .../plotsquared/bukkit/listener/PlayerEventListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java index 1af53b6ad..ca7130deb 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEventListener.java @@ -1756,11 +1756,11 @@ public class PlayerEventListener implements Listener { maxZ = Math.max(state.getZ(), maxZ); } int y = event.getBlocks().get(0).getY(); // Don't need to worry about this too much - for (Location location : Set.of( // Use Set to lazily avoid duplicate locations - Location.at(world, minX, y, maxX), - Location.at(world, minZ, y, maxZ), + for (Location location : List.of( // We don't care about duplicate locations + Location.at(world, minX, y, minZ), Location.at(world, minX, y, maxZ), - Location.at(world, minZ, y, maxX) + Location.at(world, maxX, y, minZ), + Location.at(world, maxX, y, maxZ) )) { PlotArea area = location.getPlotArea(); if (area == null) {