mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Pings and cleanup
This commit is contained in:
1 parent
94e1c25ae1
commit
641d545ff9
4 files changed
+16
-6
No files matched your search
@@ -217,6 +217,16 @@ public class SimpleChatChannel extends ChatChannel {
|
||||
} else {
|
||||
for (Player onlinePlayer : getAudience(player)) {
|
||||
simpleChat.getAudiences().player(onlinePlayer).sendMessage(formattedMessage);
|
||||
|
||||
if (simpleChat.getConfig().getBoolean("pings.enabled")) {
|
||||
if (message.toLowerCase().contains(onlinePlayer.getName().toLowerCase())) {
|
||||
String sound = simpleChat.getConfig().getString("pings.sound", "ENTITY_EXPERIENCE_ORB_PICKUP");
|
||||
float volume = (float)simpleChat.getConfig().getDouble("pings.volume");
|
||||
float pitch = (float)simpleChat.getConfig().getDouble("pings.pitch");
|
||||
|
||||
onlinePlayer.playSound(onlinePlayer.getLocation(), sound, volume, pitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user