From 06bb6856a87e4f01e55ba5296731398c63aaf5ec Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Mon, 11 May 2020 09:48:18 +0100 Subject: [PATCH] Fix bad getApplicablePlotArea(Location) code - Fixes #2815 alongside 667098268f2ce78e79c9f0dd3c7f27c41e8bf462 --- .../plotsquared/core/plot/world/DefaultPlotAreaManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java b/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java index c4528bb81..833bf3d4f 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/world/DefaultPlotAreaManager.java @@ -63,7 +63,11 @@ public class DefaultPlotAreaManager implements PlotAreaManager { case 0: return null; case 1: - return this.plotAreas[0]; + return this.plotAreas[0].getWorldHash() == location.getWorld().hashCode() + && this.plotAreas[0].contains(location) && (!this.plotAreaHasCollision + || location.getWorld().equals(this.plotAreas[0].getWorldName())) ? + this.plotAreas[0] : + null; case 2: case 3: case 4: