From 341e386df8548e3028f5fb52c9a77516887ba4d1 Mon Sep 17 00:00:00 2001 From: sauilitired Date: Thu, 20 Dec 2018 21:46:00 +0100 Subject: [PATCH] Delete Collection getBlocks to Array getBlocks --- .../plotsquared/plot/object/BlockBucket.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java index c8533cc49..5a99168a5 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/BlockBucket.java @@ -82,11 +82,7 @@ import java.util.Map.Entry; * @return Immutable collection containing randomly selected blocks */ public Collection getBlocks(final int count) { - final List blocks = new ArrayList<>(count); - for (int i = 0; i < count; i++) { - blocks.add(getBlock()); - } - return Collections.unmodifiableCollection(blocks); + return Arrays.asList(getBlockArray(count)); } /**