forked from LogBlock/LogBlock
Wait a bit before the clearlog question
This commit is contained in:
@@ -563,10 +563,13 @@ public class CommandsHandler implements CommandExecutor
|
||||
}
|
||||
editor.start();
|
||||
sender.sendMessage(ChatColor.GREEN + "Rollback finished successfully (" + editor.getElapsedTime() + " ms, " + editor.getSuccesses() + "/" + changes + " blocks" + (editor.getErrors() > 0 ? ", " + ChatColor.RED + editor.getErrors() + " errors" + ChatColor.GREEN : "") + (editor.getBlacklistCollisions() > 0 ? ", " + editor.getBlacklistCollisions() + " blacklist collisions" : "") + ")");
|
||||
if (!params.silent && logblock.hasPermission(sender, "logblock.clearlog") && questioner != null && sender instanceof Player && questioner.ask((Player)sender, "Do you want to delete the rollbacked log?", "yes", "no").equals("yes")) {
|
||||
if (!params.silent && logblock.hasPermission(sender, "logblock.clearlog") && questioner != null && sender instanceof Player) {
|
||||
Thread.sleep(1000);
|
||||
if (questioner.ask((Player)sender, "Do you want to delete the rollbacked log?", "yes", "no").equals("yes")) {
|
||||
params.silent = true;
|
||||
new CommandClearLog(sender, params, false);
|
||||
}
|
||||
}
|
||||
} catch (final Exception ex) {
|
||||
sender.sendMessage(ChatColor.RED + "Exception, check error log");
|
||||
log.log(Level.SEVERE, "[LogBlock Rollback] Exception: ", ex);
|
||||
|
Reference in New Issue
Block a user