mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-28 08:06:46 +01:00
27 lines
749 B
Java
27 lines
749 B
Java
|
package com.gmail.nossr50.runnables.skills;
|
||
|
|
||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||
|
|
||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||
|
|
||
|
public class AbilityCooldownTask extends BukkitRunnable {
|
||
|
private McMMOPlayer mcMMOPlayer;
|
||
|
private AbilityType ability;
|
||
|
|
||
|
public AbilityCooldownTask(McMMOPlayer mcMMOPlayer, AbilityType ability) {
|
||
|
this.mcMMOPlayer = mcMMOPlayer;
|
||
|
this.ability = ability;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void run() {
|
||
|
if (mcMMOPlayer.getAbilityInformed(ability)) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
mcMMOPlayer.setAbilityInformed(ability, true);
|
||
|
mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
|
||
|
}
|
||
|
}
|