mcMMO/src/main/java/com/gmail/nossr50/runnables/skills/AbilityCooldownTask.java

31 lines
1.0 KiB
Java
Raw Normal View History

package com.gmail.nossr50.runnables.skills;
import com.gmail.nossr50.datatypes.interactions.NotificationType;
2019-01-13 04:56:54 +01:00
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
import com.gmail.nossr50.util.player.NotificationManager;
import org.bukkit.scheduler.BukkitRunnable;
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
public class AbilityCooldownTask extends BukkitRunnable {
private McMMOPlayer mcMMOPlayer;
2019-01-13 04:56:54 +01:00
private SuperAbilityType ability;
2019-01-13 04:56:54 +01:00
public AbilityCooldownTask(McMMOPlayer mcMMOPlayer, SuperAbilityType ability) {
this.mcMMOPlayer = mcMMOPlayer;
this.ability = ability;
}
@Override
public void run() {
if (mcMMOPlayer.getAbilityInformed(ability)) {
return;
}
mcMMOPlayer.setAbilityInformed(ability, true);
2019-01-13 04:56:54 +01:00
NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
//mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
}
}