This commit is contained in:
parent
0329f891eb
commit
422542fe82
@ -171,6 +171,7 @@ public class NPC {
|
||||
public static void playSound(String filename) {
|
||||
URL url = NPC.class.getClassLoader().getResource(filename);
|
||||
if (url != null) {
|
||||
System.out.println("Playing " + url.toString());
|
||||
Media sound = new Media(url.toString());
|
||||
MediaPlayer mediaPlayer = new MediaPlayer(sound);
|
||||
mediaPlayer.play();
|
||||
|
Loading…
Reference in New Issue
Block a user