mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-04 14:44:44 +02:00
Most things that print to your chat will now print to action bar
This commit is contained in:
@ -1,6 +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 org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
@ -21,6 +23,8 @@ public class AbilityCooldownTask extends BukkitRunnable {
|
||||
}
|
||||
|
||||
mcMMOPlayer.setAbilityInformed(ability, true);
|
||||
mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
|
||||
|
||||
InteractionManager.sendPlayerInformation(mcMMOPlayer.getPlayer(), NotificationType.ABILITY_REFRESHED, ability.getAbilityRefresh());
|
||||
//mcMMOPlayer.getPlayer().sendMessage(ability.getAbilityRefresh());
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +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 org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -56,10 +58,12 @@ public class AbilityDisableTask extends BukkitRunnable {
|
||||
ParticleEffectUtils.playAbilityDisabledEffect(player);
|
||||
|
||||
if (mcMMOPlayer.useChatNotifications()) {
|
||||
player.sendMessage(ability.getAbilityOff());
|
||||
//player.sendMessage(ability.getAbilityOff());
|
||||
InteractionManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
|
||||
}
|
||||
|
||||
SkillUtils.sendSkillMessage(player, ability.getAbilityPlayerOff(player));
|
||||
|
||||
SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayerOff());
|
||||
new AbilityCooldownTask(mcMMOPlayer, ability).runTaskLaterAsynchronously(mcMMO.p, PerksUtils.handleCooldownPerks(player, ability.getCooldown()) * Misc.TICK_CONVERSION_FACTOR);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user