mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 02:19:05 +00:00
Added 'None' option to the message sound.
This commit is contained in:
parent
a847a50bbe
commit
bff5797a34
@ -100,6 +100,7 @@ unmuteinterval: 60
|
|||||||
bungeecordmessaging: false
|
bungeecordmessaging: false
|
||||||
|
|
||||||
# Sound for message notification
|
# Sound for message notification
|
||||||
|
# Enter 'None' to disable the sound
|
||||||
message_sound: ENTITY_PLAYER_LEVELUP
|
message_sound: ENTITY_PLAYER_LEVELUP
|
||||||
|
|
||||||
# This will allow vanished players to be exempt from being sent private messages, and will act as if they aren't online
|
# This will allow vanished players to be exempt from being sent private messages, and will act as if they aren't online
|
||||||
|
@ -100,6 +100,7 @@ unmuteinterval: 60
|
|||||||
bungeecordmessaging: false
|
bungeecordmessaging: false
|
||||||
|
|
||||||
# Sound for message notification
|
# Sound for message notification
|
||||||
|
# Enter 'None' to disable the sound
|
||||||
message_sound: ENTITY_PLAYER_LEVELUP
|
message_sound: ENTITY_PLAYER_LEVELUP
|
||||||
|
|
||||||
# This will allow vanished players to be exempt from being sent private messages, and will act as if they aren't online
|
# This will allow vanished players to be exempt from being sent private messages, and will act as if they aren't online
|
||||||
|
@ -902,8 +902,11 @@ public class Format {
|
|||||||
|
|
||||||
public static void playMessageSound(MineverseChatPlayer mcp) {
|
public static void playMessageSound(MineverseChatPlayer mcp) {
|
||||||
Player player = mcp.getPlayer();
|
Player player = mcp.getPlayer();
|
||||||
Sound messageSound = getSound(getInstance().getConfig().getString("message_sound", DEFAULT_MESSAGE_SOUND));
|
String soundName = getInstance().getConfig().getString("message_sound", DEFAULT_MESSAGE_SOUND);
|
||||||
player.playSound(player.getLocation(), messageSound, 1, 0);
|
if(!soundName.equalsIgnoreCase("None")) {
|
||||||
|
Sound messageSound = getSound(soundName);
|
||||||
|
player.playSound(player.getLocation(), messageSound, 1, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Sound getSound(String soundName) {
|
private static Sound getSound(String soundName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user