Clear caches in more cases

This commit is contained in:
SirYwell 2022-12-21 21:27:23 +01:00
parent 612402d9cb
commit ac285cae99
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -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(