mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-06 04:23:26 +00:00
Fixes #459
This commit is contained in:
parent
4231ae6755
commit
08cc8c58f2
7 changed files with 23 additions and 40 deletions
|
@ -69,18 +69,21 @@ public class Delete extends SubCommand {
|
|||
sendMessage(plr, C.ADDED_BALANCE, c + "");
|
||||
}
|
||||
}
|
||||
PS.get().removePlot(loc.getWorld(), plot.id, true);
|
||||
final long start = System.currentTimeMillis();
|
||||
final boolean result = MainUtil.clearAsPlayer(plot, true, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MainUtil.sendMessage(plr, C.CLEARING_DONE, "" + (System.currentTimeMillis() - start));
|
||||
if (plot.unclaim()) {
|
||||
final long start = System.currentTimeMillis();
|
||||
final boolean result = MainUtil.clearAsPlayer(plot, true, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
MainUtil.sendMessage(plr, C.CLEARING_DONE, "" + (System.currentTimeMillis() - start));
|
||||
}
|
||||
});
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER);
|
||||
}
|
||||
});
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER);
|
||||
}
|
||||
DBFunc.delete(plot);
|
||||
else {
|
||||
MainUtil.sendMessage(plr, C.UNCLAIM_FAILED);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (Settings.CONFIRM_DELETE && !(Permissions.hasPermission(plr, "plots.confirm.bypass"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue