Finally a simple command to easily add a looping jukebox music track to any area of your world via command blocks.
The plug-in has been tested on 1.6.2 but should work with older versions too.
- /playmusic <player> <record> [<x> <y> <z>]: Starts a single play of a jukebox record for a player, optionally at a custom x/y/z location. If location isn't specified then the player's current position is used. If triggered before the previous record has finished then the command is ignored.
- /playmusic <player> <record> ForceStart [<x> <y> <z>]: Starts the jukebox record immediately whether the previous play has finished or not.
- /playmusic <player> Stop: Stops the music for a given player.
<record> currently only supports Minecraft's built-in music discs: 13, Cat, Blocks, Chirp, Far, Mall, Mellohi, Stal, Strad, Ward, 11, Wait
To create an area with looping music (such as a world lobby or themed area) attach a command block to a redstone clock circuit (eg. a hopper clock) and add the command "playmusic @a[r=60] Mellohi". Any players within 60 blocks of the command block will hear Mellohi in a loop from their current position.
Equally you could trigger a single play on a redstone event such as a pressure plate or tripwire. Use ForceStart if this should interrupt any music still playing from a previous playmusic command (the plugin will always override music played from a jukebox block).
The music behaves as if it were played by a jukebox, so it has the same range of 65 blocks from the play location and doesn't follow the player until the track restarts. If you want the music to come from a fixed location in your map then enter co-ordinates eg. "playmusic @a[r=60] Mellohi -100 70 150".
By having several command blocks triggered at different times on a clock circuit with different records specified you can create a random play playlist, however different users will hear different songs.
- 4 comments