mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixing a null pointer error related to skill cooldowns.
This commit is contained in:
parent
d1f683b8a5
commit
2c613d5b99
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user