This commit is contained in:
Jesse Boyd 2016-03-06 23:46:37 +11:00
parent 00c174fdf1
commit 05caa2ca8d

View File

@ -40,13 +40,15 @@ public class ExpireManager {
public void confirmExpiry(final PlotPlayer pp) { public void confirmExpiry(final PlotPlayer pp) {
if (Settings.AUTO_CLEAR_CONFIRMATION && plotsToDelete != null && !plotsToDelete.isEmpty() && pp.hasPermission("plots.admin.command.autoclear")) { if (Settings.AUTO_CLEAR_CONFIRMATION && plotsToDelete != null && !plotsToDelete.isEmpty() && pp.hasPermission("plots.admin.command.autoclear")) {
int num = plotsToDelete.size(); final int num = plotsToDelete.size();
Iterator<Plot> iter = plotsToDelete.iterator(); Iterator<Plot> iter = plotsToDelete.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
Plot current = iter.next(); final Plot current = iter.next();
if (isExpired(current)) { if (isExpired(current)) {
final Plot plot = current; TaskManager.runTask(new Runnable() {
pp.teleport(plot.getCenter()); @Override
public void run() {
pp.teleport(current.getCenter());
PlotMessage msg = new PlotMessage() PlotMessage msg = new PlotMessage()
.text(num + " " + (num > 1 ? "plots are" : "plot is") + " expired:").color("$1").command("/plot list expired").tooltip("/plot list expired") .text(num + " " + (num > 1 ? "plots are" : "plot is") + " expired:").color("$1").command("/plot list expired").tooltip("/plot list expired")
//.text("\n - ").color("$3").text("Delete all (/plot delete expired)").color("$2").command("/plot delete expired") //.text("\n - ").color("$3").text("Delete all (/plot delete expired)").color("$2").command("/plot delete expired")
@ -54,6 +56,8 @@ public class ExpireManager {
.text("\n - ").color("$3").text("Remind later (/plot set keep 1d)").color("$2").command("/plot set keep 1d").tooltip("/plot set keep 1d") .text("\n - ").color("$3").text("Remind later (/plot set keep 1d)").color("$2").command("/plot set keep 1d").tooltip("/plot set keep 1d")
.text("\n - ").color("$3").text("Keep this (/plot set keep true)").color("$2").command("/plot set keep true").tooltip("/plot set keep true"); .text("\n - ").color("$3").text("Keep this (/plot set keep true)").color("$2").command("/plot set keep true").tooltip("/plot set keep true");
msg.send(pp); msg.send(pp);
}
});
return; return;
} }
} }