Do not enforce row limit for auto clear logs

This commit is contained in:
Brokkonaut
2018-08-03 23:04:35 +02:00
parent c623525847
commit 89d9da02e3
2 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ public class AutoClearLog implements Runnable {
for (final String paramStr : autoClearLog) { for (final String paramStr : autoClearLog) {
try { try {
final QueryParams params = new QueryParams(logblock, getConsoleSender(), Arrays.asList(paramStr.split(" "))); final QueryParams params = new QueryParams(logblock, getConsoleSender(), Arrays.asList(paramStr.split(" ")));
params.noForcedLimit = true;
handler.new CommandClearLog(getServer().getConsoleSender(), params, false); handler.new CommandClearLog(getServer().getConsoleSender(), params, false);
} catch (final Exception ex) { } catch (final Exception ex) {
getLogger().log(Level.SEVERE, "Failed to schedule auto ClearLog: ", ex); getLogger().log(Level.SEVERE, "Failed to schedule auto ClearLog: ", ex);

View File

@ -58,7 +58,7 @@ public final class QueryParams implements Cloneable {
public List<String> players = new ArrayList<String>(); public List<String> players = new ArrayList<String>();
public List<String> killers = new ArrayList<String>(); public List<String> killers = new ArrayList<String>();
public List<String> victims = new ArrayList<String>(); public List<String> victims = new ArrayList<String>();
public boolean excludePlayersMode = false, excludeKillersMode = false, excludeVictimsMode = false, excludeBlocksMode = false, prepareToolQuery = false, silent = false; public boolean excludePlayersMode = false, excludeKillersMode = false, excludeVictimsMode = false, excludeBlocksMode = false, prepareToolQuery = false, silent = false, noForcedLimit = false;
public CuboidRegion sel = null; public CuboidRegion sel = null;
public SummarizationMode sum = SummarizationMode.NONE; public SummarizationMode sum = SummarizationMode.NONE;
public List<Material> types = new ArrayList<Material>(); public List<Material> types = new ArrayList<Material>();
@ -87,7 +87,7 @@ public final class QueryParams implements Cloneable {
} }
public String getLimit() { public String getLimit() {
if (Config.hardLinesLimit <= 0 || (limit > 0 && limit <= Config.hardLinesLimit)) { if (noForcedLimit || Config.hardLinesLimit <= 0 || (limit > 0 && limit <= Config.hardLinesLimit)) {
return limit > 0 ? "LIMIT " + limit : ""; return limit > 0 ? "LIMIT " + limit : "";
} }
return "LIMIT " + Config.hardLinesLimit; return "LIMIT " + Config.hardLinesLimit;