Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8] Turning off minecraft background music (from code)


Recommended Posts

Hi guys,


So I'm developing an adaptive music player for a school project. I got most of the stuff working but I can't figure out how to stop the vanilla minecraft music.

I found a similar project and I suspect they used this method:



public void onBackgroundMusic(PlayBackgroundMusicEvent event) {





But this doesn't work, since PlayBackgroundMusicEvent is "@Deprecated".


Do you guys know any other method?



Many thanks,



Link to comment
Share on other sites

What version of minecraft are you on? also, if you haven't already, you'll want to add an @SubscribeEvent on whatever function stops the music.

- Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.