From 2a0b316608f934dc73e5dff87bf045c5a48958af Mon Sep 17 00:00:00 2001 From: jojo Date: Sun, 20 Sep 2020 13:37:37 +0200 Subject: [PATCH] Fix Missile.randomInit --- src/de/steamwar/misslewars/items/Missile.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index 4537487..82cca6c 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -187,8 +187,7 @@ public class Missile extends SpecialItem { File[] files = missileFolder.listFiles(); if (files == null) return; if (files.length < Config.MissileCount) return; - List pool = new ArrayList<>(files.length); - pool.addAll(Arrays.asList(files)); + List pool = new ArrayList<>(Arrays.asList(files)); for (int i = 0; i < Config.MissileCount; i++) { File missileFile = pool.remove(r.nextInt(pool.size()));