// Lets also scan for Creepers ;-) List
<EntityType
> entityTypes
=Collections.
singletonList(EntityType.
CREEPER);
// Let the scan begin! CompletableFuture
<TreeMap
<String, Integer
>> completableFuture
= insightsAPI.
scan(world, chunkLocations, materials, entityTypes
);
// When the scan has been completed, execute: completableFuture.
whenCompleteAsync((counts, error
)->{ // Print them in the console! System.
out.
println(counts.
toString()); }); } }