From 9d4c9a90b5e8e589b4726f23efd8d07270590f02 Mon Sep 17 00:00:00 2001 From: Patrick Zhong <18patz@students.harker.org> Date: Mon, 19 Jun 2017 13:31:45 -0700 Subject: [PATCH] Fix null bug in #329 --- src/main/java/me/blackvein/quests/Quester.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index 885ca852f..39ab8131e 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -2579,10 +2579,11 @@ public class Quester { } else { String[] completed = new String[completedQuests.size()]; + int index = 0; for (String s : completedQuests) { - completed[completedQuests.indexOf(s)] = s; - + completed[index] = s; + index++; } data.set("completed-Quests", completed);