mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Add option to disable other-player ability notifications
This commit is contained in:
parent
36af6d2478
commit
5298472c90
@ -718,6 +718,11 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
return config.getBoolean("Feedback.Events.XP.SendTitles", true);
|
return config.getBoolean("Feedback.Events.XP.SendTitles", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean sendAbilityNotificationToOtherPlayers()
|
||||||
|
{
|
||||||
|
return config.getBoolean("Feedback.Events.AbilityActivation.SendNotificationToOtherPlayers", true);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* JSON Style Settings
|
* JSON Style Settings
|
||||||
*/
|
*/
|
||||||
|
@ -907,7 +907,9 @@ public class McMMOPlayer {
|
|||||||
//player.sendMessage(ability.getAbilityOn());
|
//player.sendMessage(ability.getAbilityOn());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (AdvancedConfig.getInstance().sendAbilityNotificationToOtherPlayers()) {
|
||||||
SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayer());
|
SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
//Sounds
|
//Sounds
|
||||||
SoundManager.worldSendSound(player.getWorld(), player.getLocation(), SoundType.ABILITY_ACTIVATED_GENERIC);
|
SoundManager.worldSendSound(player.getWorld(), player.getLocation(), SoundType.ABILITY_ACTIVATED_GENERIC);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.runnables.skills;
|
package com.gmail.nossr50.runnables.skills;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
@ -61,8 +62,9 @@ public class AbilityDisableTask extends BukkitRunnable {
|
|||||||
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
|
NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_OFF, ability.getAbilityOff());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (AdvancedConfig.getInstance().sendAbilityNotificationToOtherPlayers()) {
|
||||||
SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayerOff());
|
SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayerOff());
|
||||||
|
}
|
||||||
new AbilityCooldownTask(mcMMOPlayer, ability).runTaskLater(mcMMO.p, PerksUtils.handleCooldownPerks(player, ability.getCooldown()) * Misc.TICK_CONVERSION_FACTOR);
|
new AbilityCooldownTask(mcMMOPlayer, ability).runTaskLater(mcMMO.p, PerksUtils.handleCooldownPerks(player, ability.getCooldown()) * Misc.TICK_CONVERSION_FACTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ Feedback:
|
|||||||
Events:
|
Events:
|
||||||
XP:
|
XP:
|
||||||
SendTitles: true
|
SendTitles: true
|
||||||
|
# Send notifications to the chat or actionbar of other nearby players when a user activates an ability
|
||||||
|
AbilityActivation:
|
||||||
|
SendNotificationToOtherPlayers: true
|
||||||
#The actionbar is the message location right above the health bar
|
#The actionbar is the message location right above the health bar
|
||||||
## If you disable the action bar messages, mcMMO will send the message to the chat system instead
|
## If you disable the action bar messages, mcMMO will send the message to the chat system instead
|
||||||
ActionBarNotifications:
|
ActionBarNotifications:
|
||||||
|
Loading…
Reference in New Issue
Block a user