Inactive [MECH/FUN/WEB] MusicService - Internet music on your land! [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by palisade, Mar 21, 2012.

  1. Offline



    Why? For a long time I've wanted to stop work on this project. It takes a great deal of my time and I get a lot of flak for it from users for either not doing what they expected, having some bugs, or not including the kitchen sink. Worse still I've been told that my pretty clear instructions in the video were just me showing off and not a tutorial, when in fact I was giving step-by-step instructions on how to set the plugin up. It's a pretty weary experience overall for no reward. In addition, I just got a new job that I start later this week that I'd prefer to focus on.

    We're on BukkitDev now! :)

    NOTE: Spout is NOT required to use this music service plugin. All music is sent to your users via an Adobe Flash plugin in the web browser. Your users only need a common web browser and Flash to hear the music. If you do not like the idea of making your users use a web browser, there are other music plugins that require your users to download a special program or install a special Minecraft client, just search the plugin repository.

    ATTENTION: WORLDGUARD USERS - Actually define your region, just selecting an area with the wooden hatchet isn't enough. Read the WorldGuard wiki for a tutorial on how to use it properly. Same goes for any other region/town plugin that I support, make sure you're following their directions on proper use of their land management plugin. If you receive a "no tower here" warning this is the reason why. In future versions of my plugin I will place a more descriptive warning.

    NOTE: I do not plan to support playback of Youtube because of their voluntary blocking of embedded music videos. If you've ever attempted to share your favorite music video on Facebook for example you'll notice that it says "This video contains content from ____. It is restricted from playback on certain sites." This means it is impossible to use Youtube as a type of internet radio.

    MusicService v1.5.2
    • Fixed exception in Towny handling code. This version is now incompatible with all past versions of Towny prior to
    • Disabled wilderness tower support until it is fixed to prevent unnecessary bug reports.
    • Preliminary support for optional Spout support in the process of being added.

    MusicService Download

    Source Code (MIT/X License):

    • Requires a web browser; Chrome, IE, Firefox, Safari, Opera, etc.
    • Requires Adobe Flash 9 or better.
    Plugins Supported:
    • Factions
    • Towny
    • WorldGuard
    • Regios
    • iZone
    Plugin Dependancies:
    • None

    What does the plugin do? Server admins can now provide Internet radio playback on any player's land. Players can walk into the wilderness and the music stops. Walk onto any land and the internet radio station chosen by the owner of that land starts playing automatically. The music covers their entire land. My plugin does not require you to have Spout.

    The potential for this is that if you have the SAM broadcasting tool from or the tools available on you can be your own DJ and host your very own dance club inside Minecraft with this for example. Or, you could simply set your land to your favorite music station. Roleplay servers could even use it to play different music in different towns to set the mood or even play back ambient tracks for scary areas, etc.

    1. Place the MusicService.jar in your bukkit's plugin folder.
    2. When you run the server for the first time with the plugin installed it will create a default config.yml that looks like:
      wwwPort: 8888
      refreshUrl: http://localhost:8888/
      ...You can edit this to point localhost at your domain or you can put your ip address instead if you don't have a domain:
      wwwPort: 8888
    3. Start your server and login with the Minecraft game client.
    4. Set up a Factions faction, Towny town, WorldGuard region, Regios region, or iZone zone.
    5. If you want icecast, use findice, but if you want shoutcast you just type (NOTE: /ms can be used instead of /music):
      /music findshout grunge
      You can also type your own search sentence there to find your own style of music.
    6. You should now see a list of ShoutCast stations (taken from, so now type:
      /music pick #
      Where # is the number of the station from the list that you want to play.
    7. Open your favorite web browser (Firefox has been reported to be having some trouble lately by some users). Requires Adobe Flash 9 or better.
    8. In your browser type:
      You will be presented with a page that lets you type your name in, and then click the button to visit your music player page. Or, you can visit:
      Keep in mind if you aren't logged into the minecraft server you will get a 404 page not found error.
    9. Music should start playing now.
    10. Walk outside of your land and the music stops.
    11. Walk inside your land again and the music will start again. Be aware, there is a slight delay.
    NOTE: If you don't have a domain, you can get free dynamic dns software and a free dns name from or The software runs in the background on your computer and always makes sure the dynamic domain name points to your IP address. Or, you can contact your ISP and ask to pay extra for a static IP address, one that doesn't change. And, you could purchase a domain (google for domain registries) and point it at your static IP.


    NOTE: You can type /ms wherever /music is used.
    • /music findshout <searchString>
      Finds music on for you to play.
    • /music findice <searchString>
      Finds music on for you to play.
    • /music pick #
      Picks the # from the results provided by findshout and findice.
    • /music reload
      Attempts to reload the music station at your position.
    • /music setshout url
      The URL represents the ip : port of the shoutcast stream location you wish to play.
    • /music setice url
      The URL represents the ip : port of the icecast stream location you wish to play.

    Please note the music service commands are only usable by default by ops so you need to allow them in your permissions system if you want others to use the commands.
    description: Set the music URL for this shoutcast location.
    description: Set the music URL for this icecast location.
    description: Reload the music at this location.
    description: Pick the music stream produced by either findshout or findice command.
    description: Find music streams on shoutcast by searching.
    description: Find music streams on icecast by searching.

    • Allows users to set music on their land.
    • Players can listen to music via the web site, and as they move around the land it changes stations.
    • Factions support.
    • Towny support.
    • WorldGuard regions support.
    • Regios support.
    • iZone support.
    • radio streams (commercial broadcasting tool by AOL / Nullsoft makers of winamp).
    • radio stations (free open source broadcasting tool - clone of shoutcast).
    To Do:
    • Residence support.
    • Use signs to switch or set channels.
    • Add a lock music command that users can use to force the radio to stay on a certain channel.
    • Add a listen music command that allows a user to override and play their own station for themselves anywhere.
    • Add a list stations command to list all possible stations in the world.
    • Add a request station command that would send a land owner a player's desire for a particular station.
    • Look into optional support of Spout for direct playback.
    • Allow fading in and out of the music as the player moves into or away from the area where the station plays.
    • Create a cookie in the browser for the user so they don't have to login every time.
    • Support SoundCloud.
    • Support Pandora.
    • Allow global music stations that cover the entire world.
    Known Issues:
    • Chrome plays music slightly quieter than other browsers. Not much I can do about this one. Complain to Google.
    • Changing your faction name drops the station and you have to setmusic it again.
    • Wilderness stations are not working correctly anymore.
    • If you try to access the music web page via 192.168.x.x local addresses, the web page will not refresh correctly and therefore when you enter or leave your land the music cannot change. This has so far been confirmed to happen on Google Chrome, I'm not sure about the other web browsers.
    How To Host Your Own Radio Music Stream:

    Here's a video on how to configure DNAS support in the Winamp music player:

    NOTE: You don't have to fill in the aim/icq/irc areas that he fills in. And, also where he places the URL you can just put your IP address if you don't have a domain. Also, as he mentions in the video the bitrate at which you want to encode will need to be limited by your available upload bandwidth, he uses 128kbit as an example but you can raise or lower this to match your actual bandwidth capabilities. At the end of the video he tells you to put it on line input, don't do this unless you're a DJ in real life and have turntables/microphone/etc. You can just leave it on the option to play from the winamp playlist which you should load up with all your favorite music.

    I also found a text tutorial for how to set up the commercial program on called SAM, this is for SAM3 so it is not the latest version but it shows the general idea of how to use that product:

    And, this fella has a tutorial on icecast:

    Additional Information:

  2. You should post this in the WIP-Section
  3. Offline


    Can't seem to find a WIP section, so I'll assume this was a joke at my expense.

    All plugins are a work in progress. However, it is worth noting that this plugin seems stable now, it's just a matter of making a few small adjustments and putting out a release.

    Note: I'm about to jump in the car and head home right now. I'll try to get something up for download ASAP. The only two things I really need to do before this is releasable is remove hardcoded paths and add the wilderness stations to a YML. Then, it should be ready for download as version 1.2.4.

    *** NEW VERSION IS OUT NOW.... In record time IMHO.
  4. Offline


  5. Offline


    *shrugs* I believe it's done. Maybe some new features will show up in the future or I'll make some adjustments based on bug fixes. Other than that, it's fully functional and I'm using it on my server.
    Sayshal likes this.
  6. Offline


    Is this plugin usable with WorldGuard regions or Residence or just Towny and Factions?
  7. Offline


    So far only Factions.

    However, I can add WorldGuard, Residence and Towny to the To Do list and look into those. Which one do you think would you prefer first?

    I'm playing around a little with the WorldGuard API, so far I've jotted up some code that seems to compile. I can detect the owner of a WorldGuard region and set the music station for that region. I'll still need to write up some code to detect when players move, teleport or portal into one of those regions and switch their currently playing music station.

    Interesting to note, WorldGuard regions can overlap... I'm not certain how to handle that. For setting ownership, I'm currently just looking at the first one I find the player owns and then stopping. However, that would prevent an owner from being able to set a station for each individual region if they're overlapping. Alternatively, I could let the owner know to move to a spot that doesn't overlap. Or, I could notify them to be provide a specific region ID as an argument to the setmusic command. However, I'm guessing the players won't recognize region IDs. As for playback when you're on overlapping regions, I could simply pick the first one that I notice and ignore the remainder. So, one would arbitrarily win I suppose. Or, I could round robin them and pick the next one each time that area is walked over. This is turning out to be slightly more complex than factions which doesn't allow overlaps afaik.

    Just looked into the API and apparently regions can be prioritized by the admin. So, I could fall back on just picking the first owned region I found when there are no priorities. And, when there are priorities, I can pick the highest priority region that the player owns for setting the music. That should solve the problem I think. Same for playback.


    Just got the WorldGuard support working! :) It'll be in the next update after some testing.

    Basically, I check if factions is installed if it is and you're in faction land, it trumps worldguard regions. If worldguard is installed, and you're in a worldguard region it trumps wilderness radio towers. If you're not in a worldguard region and there are no radio towers, then nothing will play. Also, I check for worldguard region priority, top priority wins. If you don't set a priority, then I just pick the last one I find that overlaps. Only the owner of a worldguard region can set the music for his region. With faction land, overlaps and priorities being the exceptions.
  8. Offline


    Now that Mojang is releasing pre-releases and bukkit was able to release a dev build of 1.2.5, I was able to verify my plugin will work correctly on Minecraft 1.2.5 when it releases. My thanks go out to Mojang and Bukkit for making this happen.
  9. Offline


    Uhh I have no idea how your plugin works, but it sounds nice, removed changelog from spoiler, approved.
  10. Offline


    Oh mah gosh, this plugin is sick. Can you please make World Guard regions support top priority? Is it possible to hook it into a playlist online, for example one like this? And what would happen if the one of the players doesn't have Adobe Flash?
  11. Uh...
    Is there another tutorial for people that didn't understand the "How-To"?
  12. Offline


    This plugin is BRILLIANT!!! The Howto makes so much sense and it's awesome. Thanks man. I don't use factions so worldguard regions is a great idea. However the radio station antenna's are great!
  13. How did you figure it out?
    I don't understand it...
    I have a playlist.pls, but after that, I don't know what to do!
  14. Offline


    Have you set up the server files and the plugin files?
  15. I have the MusicService.jar in my plugins folder, and my config looks like this:
    relativeUrl: /live
    But that doesn't work.
    What did I do wrong?
    I also got those website links from the playlist.pls file.
  16. Offline


    Are the web server and bukkit server on the same computer?
  17. Offline


    please make a totorial, that will be easy way to listen music in own server
  18. I don't even know how to host a web server...
    Can I use github pages aswell?
    Just make a new directory and push the files in there?
  19. Offline


    I don't know if the github one would work, but you I'm pretty sure you need a web server. And it should look more like this


    I think
    I'll make a video....

    I hope you atleast have a proper bukkit server.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 24, 2016
  20. Oh yeah, sure, I know how to do that, I have been hosting since hMod, so no problem with that.
    Just the web server is a problem.
  21. Offline


    Good. Host at home or bought server?
  22. Offline


    Is there any commands listed in the readme.txt or do i have to find the commands out myself?
  23. Offline


  24. Offline


    WorldGuard Info: Hi all, I've been busy with work irl, so haven't had a chance to work on the plugin very much. However, I did start initial support of WorldGuard, it will probably be in the next version. It does work, but I haven't fully tested it yet and worked out any kinks.

    GitHub Info: As soon as I get that done I'll most likely also dump it on github so other developers can help me make this plugin awesome.

    License Info: I'm probably going to target an MIT/X license, as it is the least restrictive and straightforward.

    Ahhhh! It's Hard!! HELP! Info: Regarding the difficulty of the how-to, sorry about that I tried my best to explain it. Unfortunately, it is simply not easy to set all this up, but hopefully it gets easier as I make more version releases of the plugin. Right now it does require some amount of server administrator experience. I've added a few forum posts to the info at the top which provide instructions on installing and using the plugin as well as building the wilderness music tower. Keep in mind, that there is currently a known bug that when you shut your server down it forgets the wilderness stations and you have to /setmusic them again.

    Upcoming Built-in Webserver Info: I know that's asking a lot for a mere video game server, which is why in the near future I do plan on writing my own faux web server in Java and integrating it with the plugin for the purposes of hosting these little html pages for the music player. That way, people who don't have their own web server service running will still have the option of using this plugin. This fits with the way other plugins work, e.g. dynmap allows you to use either a real webserver or it's own internal one with it defaulting to the internal one. I think that approach would make it easy for users to simply drop the plugin and just go. It'd be nice, and I do plan on doing this for you guys.

    HowTo Video Info: daredevilk has offered to make a youtube video of how to set it up, as soon as he has one I'll post it in the plugin info at the very top.

    BukkitDev Info: Also, we're officially set up as a plugin on bukkitdev now, so I'll be posting a link to the bukkitdev page for this project as well.

    How Do I Get INSERT-URL-HERE Working Info: I'm at work at the moment, and unfortunately they have a proxy here that blocks music streams so I can't test out your URLs. When I get home I'll take a look and see if I can figure out how to stream your music on my own server and if I figure it out I'll post a response on how to get it working if I can.

    Can You Get This Playlist Working Info: I don't speak the language on the page that the questioner posted so I don't quite follow what it is about. But, all shoutcast music streams are essentially very large playlists of mp3s being played over and over in sequence. So, ya it can play a playlist. If what you're asking is if I support an alternate protocol other than Shoutcast's at the moment, the answer is no not right now. I can look into that in future versions, but worldguard support, a built-in webserver, making things easier, etc would take precedence.

    Glad you guys love the plugin! :) I knew I had something interesting when I made this. Hehe.
  25. Offline


    Keep it cool
  26. Offline


    Define keeping it cool? :p

    Regarding coolness, I'll probably make the music player page look nicer in future versions too when I get around to it. Right now it's just sort of a music player bar sitting on a white blank page with some boring status messages. :confused:
  27. Offline


    good idea to plógin

    A broken

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 24, 2016
  28. Home Hosted.
  29. Offline


    Are you running it on Windows or on Linux? On Linux install Apache and follow my plugin's README.TXT to determine which files to place in the wwwroot of the webserver.

    I've only tested it on Linux so far, but afaik there should be no reason it couldn't be hosted on Windows through IIS or Apache. Though, the path to the www documents will need to be in a location that doesn't cause UAC to freak out when my plugin tries to write files there. So, you might want to put it in your %APPDATA% directory or Documents folder, or something like that.

    Just found this, some guy made a portable version of Apache that you can just unzip and it's all preconfigured and ready to go for Windows. I haven't tried it yet, but it looks pretty cool. It even includes things you might not need like mysql, php, etc. He even lets you register it as a windows service so it'll run in the background when your computer reboots:

    The download for his lite version is at the following link, this includes the bare minimum and is a smaller download (like 43MB) than his full version:

    If you end up using this and you unzip it to c:\xampp on your XP box, then your wwwRoot would be: C:\xampp\htdocs. If you're running on Win7, and don't want uac crying, then you'll need to put xampp inside c:\Users\YourUser\Documents or something like that.

    Worth noting, you run setup_xampp.bat if you're running it off your hard drive instead of a USB key first. If you ever move xampp to another folder or drive on your computer then you need to run that bat again. Then you can run xampp_control.exe and hit Start Apache, you can leave mysql off unless you need it for phpmyadmin (but make sure you change the default passwords). Then you connect to your http://localhost with a web browser, and you should see the xampp test page, and if you click Status you should see that everything is Status: Activated.

    Then just create a folder called music in your xampp htdocs folder, copy the files I specified in the MusicService zip in there, set up the config.yml in your minecraft-server-folder/plugins/MusicService folder to point to your htdocs and use your IP as your refresh url. AFAIK it should work. The config would look something like:

    wwwRoot: c:\xampp\htdocs

    NOTE: I haven't yet tested this on Windows with my MusicService plugin to see if it will work. It was just an idea of how you might be able to get it working on Windows. Again, I've only officially tested on Linux at the moment.

    ADDITIONAL NOTE: If you're hosting at your home, and you only have a dynamic IP address it is going to change eventually... So, you'll want to get a free dynamic domain, I'd recommend something like:

    Register a free subdomain that points to your IP there. And, just run one of their clients in the background on your computer and it'll update the subdomain to point to your home IP as it changes automatically (Some newer home routers can do this for you instead of software...):

    By the way, I know this is a lot to take in. Unfortunately, even when I do write my own web server code into the plugin, you're still going to have to be able to set up some of this anyways.

    At the moment the only real command is /setmusic and you use it by standing in your faction area or near your radio tower and typing something similar to the following:


    That's an alternative post-grunge music station that I like to use for testing purposes, and I've verified it works. So, it's a good one for you to try if you want to just hear something that works right away.

    I'll have more commands in the future.

    On my web server my apache is set up to provide each user with a public_html path for hosting their own web pages. So, I decided to host the music htmls for the MusicService in my palisade user's public_html. I set the config to the following settings:

    wwwRoot: /home/palisade/public_html
    relativeUrl: /~palisade

    This allows me to provide the following URL to end users for music playback, using my minecraft id of blakesteel as an example:

    If instead you were hosting at the root of your wwwRoot instead of under a user, it might be something like this, assuming that your www root is located in /var/www (I left off the relativeUrl because we're storing everything in the root path):

    wwwRoot: /var/www

    And, you would create a folder called music in your /var/www where the html files will appear. And, into which you copy the files snel.swf, player2.swf, swf.js, and music.html.

    Then your players would simply connect to:

    Where myplayername is their minecraft id.

    I think, though, that isn't your own webserver but instead is the music streaming service you want to play back. If that's the case, you need to give your own domain for your webserver instead into that configuration file and not this stream url. And, when you enter your server and create some faction land, then you can walk into that area and type the stream url via the setmusic command to play it there:


    And, you should start hearing your music. The reason you have to put that /live on the end is because your stream is coming from there. Most shoutcast streams don't have a /live on the end so yours is an unusual case. When I get home later tonight I'll try to see if I can hear your stream on my minecraft server.

    Hope this helps.

    UPDATE: Okay, I figured out why your stream doesn't work. It's an Icecast server instead of a Shoutcast server and I don't have support for Icecast yet.

    UPDATE 2: I've found an alternative flash player that can play both the Shoutcast and Icecast streams. When the next version of the plugin comes out you'll be able to play your stream again.

    UPDATE 3: Actually! I found out I can play Icecast streams with the current player. However, Shoutcast streams require I append ;stream.mp3 and icecast require I don't. For example, when I pass it to the player, if I send it:

    Then it will work. However, I'm currently sending it:;stream.mp3

    Which is correct if it were a Shoutcast stream.

    The problem is that there is no way for me to know which stream it is. And, I was appending the /;stream.mp3 for the convenience of the users so they only had to provide an IP : PORT. If I require users to type that in they're going to get it wrong a lot. Also, you would have typed it in too not realizing your stream was Icecast.

    Also, I found out if I pass the player:

    It doesn't work, the trailing / breaks it. This is very sensitive. The other player I was thinking of switching to has the exact same problem. So, there is no immediate solution to the problem. I'm going to have to think about this one.

    For now I'm going to leave it Shoutcast-only since there 30k more of those than Icecast, until I can come up with either a way of detecting which it is in Javascript or if I find a way to make it simpler to add streams.

    UPDATE 4: The plot thickens.... Apparently, icecast servers will give you their server status page when you visit them without using that /live/ and appending status.xsl. I could prolly jot up some js code to detect if that url exists, and if it does, assume that it's an icecast stream and then not append /;stream.mp3 to the end. Likewise when you visit a Shoutcast URL with your browser you get a DNAS server status page that's a bit different than the Icecast one. Though, it turns out I can't just check for the non-existance of status.xsl because Shoutcast servers will serve up a page that looks like:

    <HTML><HEAD><TITLE>SHOUTcast Server</TITLE></HEAD><BODY><H3>Invalid resource</H3>
    So, I think to solve this I need to parse that and see if it has SHOUTcast Server in the title. If so, then I can default to Shoutcast, else attempt Icecast.

    UPDATE 5: Okay, I'm new to javascript and web development in general. Just found out there's no way for me to check the existence of a file on an external domain because of cross-site scripting security. I won't be able to determine if it's a shoutcast or icecast stream that way, not from javascript anyways.

    UPDATE 6: I've come up with this interesting bit of code, I can inject this chunk of code into the html pages provided to users and it'll check if the icecast.png logo exists on the server. If the logo exists, then it's an icecast stream, otherwise it's most likely a shoutcast stream or something else entirely. This should allow me to detect which it is. The html below checks your fragradio stream and prints "Icecast protocol assumed." on the webpage. I'll test it in the actual music plugin when I get home and see if it is a valid way of switching between the two protocols successfully or not and let you guys know if it worked. I don't see any reason it won't, but it'll probably have to be tested on all web browsers.

    <img src="" onload="changeStatus('Icecast protocol assumed.');" onerror="changeStatus('Shoutcast protocol assumed.');" />

    WorldGuard support will be in the next version. :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 24, 2016
  30. Offline


    Ok, That helps

Share This Page