From 2c613d5b99253268934a09e38aa4ced9ae310683 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Wed, 7 Nov 2012 19:04:17 -0800 Subject: [PATCH] Fixing a null pointer error related to skill cooldowns. --- src/main/java/com/gmail/nossr50/util/Skills.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/util/Skills.java b/src/main/java/com/gmail/nossr50/util/Skills.java index 2084cbdb1..b90ccffba 100644 --- a/src/main/java/com/gmail/nossr50/util/Skills.java +++ b/src/main/java/com/gmail/nossr50/util/Skills.java @@ -80,6 +80,9 @@ public class Skills { * @param ability The ability to watch cooldowns for */ public static void watchCooldown(Player player, PlayerProfile profile, AbilityType ability) { + if(player == null || profile == null || ability == null) + return; + if (!profile.getAbilityInformed(ability) && cooldownOver(profile.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) { profile.setAbilityInformed(ability, true); player.sendMessage(ability.getAbilityRefresh());