mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 12:35:27 +02:00
SuperAbilityManager will handle super ability stuff
This commit is contained in:
@@ -17,11 +17,11 @@ public class AbilityCooldownTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mcMMOPlayer.getPlayer().isOnline() || mcMMOPlayer.getAbilityInformed(ability)) {
|
||||
if (!mcMMOPlayer.getPlayer().isOnline() || mcMMOPlayer.getSuperAbilityManager().getAbilityInformed(ability)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOPlayer.setAbilityInformed(ability, true);
|
||||
mcMMOPlayer.getSuperAbilityManager().setAbilityInformed(ability, true);
|
||||
|
||||
NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
|
||||
//mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
|
||||
|
@@ -28,7 +28,7 @@ public class AbilityDisableTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mcMMOPlayer.getAbilityMode(ability)) {
|
||||
if (!mcMMOPlayer.getSuperAbilityManager().getAbilityMode(ability)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ public class AbilityDisableTask extends BukkitRunnable {
|
||||
|
||||
EventUtils.callAbilityDeactivateEvent(player, ability);
|
||||
|
||||
mcMMOPlayer.setAbilityMode(ability, false);
|
||||
mcMMOPlayer.setAbilityInformed(ability, false);
|
||||
mcMMOPlayer.getSuperAbilityManager().setAbilityMode(ability, false);
|
||||
mcMMOPlayer.getSuperAbilityManager().setAbilityInformed(ability, false);
|
||||
|
||||
ParticleEffectUtils.playAbilityDisabledEffect(player);
|
||||
|
||||
|
@@ -18,11 +18,11 @@ public class ToolLowerTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mcMMOPlayer.getToolPreparationMode(tool)) {
|
||||
if (!mcMMOPlayer.getSuperAbilityManager().getToolPreparationMode(tool)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMOPlayer.setToolPreparationMode(tool, false);
|
||||
mcMMOPlayer.getSuperAbilityManager().setToolPreparationMode(tool, false);
|
||||
|
||||
if (Config.getInstance().getAbilityMessagesEnabled()) {
|
||||
NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.TOOL, tool.getLowerTool());
|
||||
|
Reference in New Issue
Block a user