mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +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
|
* @param ability The ability to watch cooldowns for
|
||||||
*/
|
*/
|
||||||
public static void watchCooldown(Player player, PlayerProfile profile, AbilityType ability) {
|
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)) {
|
if (!profile.getAbilityInformed(ability) && cooldownOver(profile.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown(), player)) {
|
||||||
profile.setAbilityInformed(ability, true);
|
profile.setAbilityInformed(ability, true);
|
||||||
player.sendMessage(ability.getAbilityRefresh());
|
player.sendMessage(ability.getAbilityRefresh());
|
||||||
|
Loading…
Reference in New Issue
Block a user