Potential fix for IndexOutOfBoundsExceptions #139 #154

This commit is contained in:
HappyPikachu 2017-12-03 22:22:21 -05:00
parent 14882fb3ed
commit 2f08800e8c
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>3.0.6</version>
<version>3.0.7</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -1990,7 +1990,7 @@ public class Quester {
// Legacy
is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0);
}
getQuestData(quest).blocksBroken.set(names.indexOf(s), is);
getQuestData(quest).blocksBroken.add(names.indexOf(s), is);
}
}
if (questSec.contains("blocks-damaged-names")) {
@ -2005,7 +2005,7 @@ public class Quester {
// Legacy
is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0);
}
getQuestData(quest).blocksDamaged.set(names.indexOf(s), is);
getQuestData(quest).blocksDamaged.add(names.indexOf(s), is);
}
}
if (questSec.contains("blocks-placed-names")) {
@ -2020,7 +2020,7 @@ public class Quester {
// Legacy
is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0);
}
getQuestData(quest).blocksPlaced.set(names.indexOf(s), is);
getQuestData(quest).blocksPlaced.add(names.indexOf(s), is);
}
}
if (questSec.contains("blocks-used-names")) {
@ -2035,7 +2035,7 @@ public class Quester {
// Legacy
is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0);
}
getQuestData(quest).blocksUsed.set(names.indexOf(s), is);
getQuestData(quest).blocksUsed.add(names.indexOf(s), is);
}
}
if (questSec.contains("blocks-cut-names")) {
@ -2050,7 +2050,7 @@ public class Quester {
// Legacy
is = new ItemStack(Material.matchMaterial(s), amounts.get(names.indexOf(s)), (short) 0);
}
getQuestData(quest).blocksCut.set(names.indexOf(s), is);
getQuestData(quest).blocksCut.add(names.indexOf(s), is);
}
}
if (questSec.contains("fish-caught")) {