Delete Collection getBlocks to Array getBlocks

This commit is contained in:
sauilitired 2018-12-20 21:46:00 +01:00
parent f4140ae728
commit 341e386df8

View File

@ -82,11 +82,7 @@ import java.util.Map.Entry;
* @return Immutable collection containing randomly selected blocks
*/
public Collection<PlotBlock> getBlocks(final int count) {
final List<PlotBlock> blocks = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
blocks.add(getBlock());
}
return Collections.unmodifiableCollection(blocks);
return Arrays.asList(getBlockArray(count));
}
/**