Made type param working with chestaccess params
This commit is contained in:
1 parent
9f7252b872
commit
271d3c7e83
2 files changed
+8
-1
No files matched your search
@@ -415,7 +415,7 @@ public class CommandsHandler implements CommandExecutor
|
|||||||
params.needPlayer = true;
|
params.needPlayer = true;
|
||||||
if (params.types.size() == 0 || params.types.contains(63) || params.types.contains(68))
|
if (params.types.size() == 0 || params.types.contains(63) || params.types.contains(68))
|
||||||
params.needSignText = true;
|
params.needSignText = true;
|
||||||
if (params.types.size() == 0 || params.types.contains(23) || params.types.contains(54) || params.types.contains(61) || params.types.contains(62))
|
if (params.types.size() == 0 || params.types.contains(23) || params.types.contains(54) || params.types.contains(61) || params.types.contains(62) || params.bct == BlockChangeType.CHESTACCESS)
|
||||||
params.needChestAccess = true;
|
params.needChestAccess = true;
|
||||||
if (params.limit < 0 && params.sum == SummarizationMode.NONE)
|
if (params.limit < 0 && params.sum == SummarizationMode.NONE)
|
||||||
params.limit = config.linesLimit;
|
params.limit = config.linesLimit;
|
||||||
|
|||||||
@@ -187,6 +187,13 @@ public class QueryParams implements Cloneable
|
|||||||
break;
|
break;
|
||||||
case CHESTACCESS:
|
case CHESTACCESS:
|
||||||
where.append("type = replaced AND (type = 23 OR type = 54 OR type = 61 OR type = 62) AND ");
|
where.append("type = replaced AND (type = 23 OR type = 54 OR type = 61 OR type = 62) AND ");
|
||||||
|
if (!types.isEmpty()) {
|
||||||
|
where.append('(');
|
||||||
|
for (final int type : types)
|
||||||
|
where.append("itemtype = " + type + " OR ");
|
||||||
|
where.delete(where.length() - 4, where.length());
|
||||||
|
where.append(") AND ");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!players.isEmpty() && sum != SummarizationMode.PLAYERS)
|
if (!players.isEmpty() && sum != SummarizationMode.PLAYERS)
|
||||||
|
|||||||
Reference in new issue
Block a user