mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-04 14:44:44 +02:00
Skill Unlock notifications now have sounds
This commit is contained in:
src/main/java/com/gmail/nossr50
datatypes
player
listeners
util
@ -8,11 +8,14 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerNotificationEvent;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.TextComponentFactory;
|
||||
import com.gmail.nossr50.util.sounds.SoundManager;
|
||||
import com.gmail.nossr50.util.sounds.SoundType;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.SoundCategory;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class NotificationManager {
|
||||
@ -122,6 +125,9 @@ public class NotificationManager {
|
||||
//CHAT MESSAGE
|
||||
mcMMOPlayer.getPlayer().spigot().sendMessage(TextComponentFactory.getSubSkillUnlockedNotificationComponents(mcMMOPlayer.getPlayer(), subSkillType));
|
||||
|
||||
//Unlock Sound Effect
|
||||
SoundManager.sendCategorizedSound(mcMMOPlayer.getPlayer(), mcMMOPlayer.getPlayer().getLocation(), SoundType.SKILL_UNLOCKED, SoundCategory.MASTER);
|
||||
|
||||
//ACTION BAR MESSAGE
|
||||
/*if(AdvancedConfig.getInstance().doesNotificationUseActionBar(NotificationType.SUBSKILL_UNLOCKED))
|
||||
mcMMOPlayer.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(LocaleLoader.getString("JSON.SkillUnlockMessage",
|
||||
|
Reference in New Issue
Block a user