From 3240fc95591292cb628f3bafc57fb5c225097ed6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 15 Dec 2016 17:37:26 +1100 Subject: [PATCH] Exit plot on unclaim Fixes #1471 --- .../java/com/intellectualcrafters/plot/object/Plot.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java index 7320beae4..49678b1f3 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java @@ -1091,11 +1091,15 @@ public class Plot { return false; } for (Plot current : getConnectedPlots()) { + List players = current.getPlayersInPlot(); + for (PlotPlayer pp : players) { + PlotListener.plotExit(pp, current); + } getArea().removePlot(getId()); DBFunc.delete(current); current.owner = null; current.settings = null; - for (PlotPlayer pp : current.getPlayersInPlot()) { + for (PlotPlayer pp : players) { PlotListener.plotEntry(pp, current); } }