mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Some refactoring
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbility;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
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;
|
||||
private SuperAbility ability;
|
||||
private SuperAbilityType ability;
|
||||
|
||||
public AbilityCooldownTask(McMMOPlayer mcMMOPlayer, SuperAbility ability) {
|
||||
public AbilityCooldownTask(McMMOPlayer mcMMOPlayer, SuperAbilityType ability) {
|
||||
this.mcMMOPlayer = mcMMOPlayer;
|
||||
this.ability = ability;
|
||||
}
|
||||
@ -24,7 +24,7 @@ public class AbilityCooldownTask extends BukkitRunnable {
|
||||
|
||||
mcMMOPlayer.setAbilityInformed(ability, true);
|
||||
|
||||
InteractionManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
|
||||
NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
|
||||
//mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbility;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.util.player.NotificationManager;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -19,9 +19,9 @@ import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
|
||||
public class AbilityDisableTask extends BukkitRunnable {
|
||||
private McMMOPlayer mcMMOPlayer;
|
||||
private SuperAbility ability;
|
||||
private SuperAbilityType ability;
|
||||
|
||||
public AbilityDisableTask(McMMOPlayer mcMMOPlayer, SuperAbility ability) {
|
||||
public AbilityDisableTask(McMMOPlayer mcMMOPlayer, SuperAbilityType ability) {
|
||||
this.mcMMOPlayer = mcMMOPlayer;
|
||||
this.ability = ability;
|
||||
}
|
||||
@ -59,7 +59,7 @@ public class AbilityDisableTask extends BukkitRunnable {
|
||||
|
||||
if (mcMMOPlayer.useChatNotifications()) {
|
||||
//player.sendMessage(ability.getAbilityOff());
|
||||
InteractionManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.util.player.NotificationManager;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
@ -26,7 +26,7 @@ public class ToolLowerTask extends BukkitRunnable {
|
||||
mcMMOPlayer.setToolPreparationMode(tool, false);
|
||||
|
||||
if (Config.getInstance().getAbilityMessagesEnabled()) {
|
||||
InteractionManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.TOOL, tool.getLowerTool());
|
||||
NotificationManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.TOOL, tool.getLowerTool());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user