diff --git a/src/main/java/io/github/biligoldenwater/midiplayer/PlayMidi.java b/src/main/java/io/github/biligoldenwater/midiplayer/PlayMidi.java index efedaa0..79a93e2 100644 --- a/src/main/java/io/github/biligoldenwater/midiplayer/PlayMidi.java +++ b/src/main/java/io/github/biligoldenwater/midiplayer/PlayMidi.java @@ -446,9 +446,11 @@ public void run() { } } - NoteParticle noteParticle = new NoteParticle(noteLocation); - noteParticle.start(MidiPlayer.getInstance(),50,1); - PlayingNoteParticles.playingNoteParticles.add(noteParticle); + if(useDisplayFunction) { + NoteParticle noteParticle = new NoteParticle(noteLocation); + noteParticle.start(MidiPlayer.getInstance(), 50, 1); + PlayingNoteParticles.playingNoteParticles.add(noteParticle); + } } else { targetPlayer.sendMessage("Invalid musical instrument:" + musicalInstrument);