Exit plot on unclaim

Fixes #1471
This commit is contained in:
Jesse Boyd 2016-12-15 17:37:26 +11:00
parent 7b1c4a5042
commit 3240fc9559
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -1091,11 +1091,15 @@ public class Plot {
return false;
}
for (Plot current : getConnectedPlots()) {
List<PlotPlayer> 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);
}
}