Handle null rewards values, fixes #345

This commit is contained in:
HappyPikachu 2016-06-16 20:18:18 -04:00
parent 7dd2b006ad
commit 523032053e
3 changed files with 6 additions and 2 deletions

View File

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

View File

@ -491,7 +491,7 @@ public class PlayerListener implements Listener, ColorUtil {
if (quester.hasObjective(quest, "breakBlock")) {
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
if (evt.getPlayer().getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH) == false && evt.isCancelled() == false) {
quester.breakBlock(quest, evt.getBlock().getType());
}

View File

@ -4988,6 +4988,10 @@ try{
}
for (Object o : list) {
if (o == null) {
Bukkit.getLogger().severe("A null " + c.getSimpleName() + " value was detected in quests.yml, please correct the file");
return false;
}
if (c.isAssignableFrom(o.getClass()) == false) {
return false;