Skip to content

Commit ae5f948

Browse files
authored
Merge pull request #15 from Naw0ke/master
Clean sound code
2 parents 0bc745a + 945767c commit ae5f948

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/net/voxelarc/allaychat/chat/LocalChatManager.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,10 @@ && handleMessage(from, message)) {
346346
ChatUtils.sendMessage(player, spyComponent);
347347
});
348348

349-
Player targetPlayer = Bukkit.getPlayerExact(target.getName());
350349
String soundName = plugin.getPrivateMessageConfig().getString("sound");
351350
if (soundName != null && !soundName.isEmpty()) {
352351
Sound sound = Sound.sound(Key.key(soundName), Sound.Source.MASTER, 1.0f, 1.0f);
353-
assert targetPlayer != null;
354-
targetPlayer.playSound(sound);
352+
target.playSound(sound);
355353
}
356354

357355
return true;

0 commit comments

Comments
 (0)