Check if world is logged in LogBlock.getCount

This commit is contained in:
Brokkonaut
2018-07-31 23:17:26 +02:00
parent e5097a1577
commit fd450aee80

View File

@@ -314,6 +314,9 @@ public class LogBlock extends JavaPlugin {
}
public int getCount(QueryParams params) throws SQLException {
if (params == null || params.world == null || !Config.isLogged(params.world)) {
throw new IllegalArgumentException("World is not logged: " + ((params == null || params.world == null) ? "null" : params.world.getName()));
}
final Connection conn = getConnection();
Statement state = null;
if (conn == null) {