From ac285cae99f2c2f2e50dff726c47590a3edb3c6f Mon Sep 17 00:00:00 2001 From: SirYwell Date: Wed, 21 Dec 2022 21:27:23 +0100 Subject: [PATCH] Clear caches in more cases --- Core/src/main/java/com/plotsquared/core/plot/Plot.java | 2 ++ .../java/com/plotsquared/core/plot/PlotModificationManager.java | 1 + 2 files changed, 3 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/plot/Plot.java b/Core/src/main/java/com/plotsquared/core/plot/Plot.java index 6f38f0047..412268913 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/Plot.java +++ b/Core/src/main/java/com/plotsquared/core/plot/Plot.java @@ -1303,6 +1303,7 @@ public class Plot { DBFunc.delete(current); current.setOwnerAbs(null); current.settings = null; + current.clearCache(); for (final PlotPlayer pp : players) { this.plotListener.plotEntry(pp, current); } @@ -1873,6 +1874,7 @@ public class Plot { this.area.removePlot(this.id); this.id = plot.getId(); this.area.addPlotAbs(this); + clearCache(); DBFunc.movePlot(this, plot); TaskManager.runTaskLater(whenDone, TaskTime.ticks(1L)); return true; diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java index 7bbba4e1f..cfab430b8 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotModificationManager.java @@ -263,6 +263,7 @@ public final class PlotModificationManager { return; } Plot current = queue.poll(); + current.clearCache(); if (plot.getArea().getTerrain() != PlotAreaTerrainType.NONE) { try { PlotSquared.platform().regionManager().regenerateRegion(