JukeboxChanger
JukeboxChanger extends the functionality of the Minecraft Jukebox by adding the ability to play a sequence of records without player intervention. In effect it changes the Jukebox ''Player'' into a record ''Changer.''
Installation
Just drop the .jar into your plugins directory and restart the server. There is one configurable parameter, the LockBlock option. By default, the lockblock is a diamond block, or you can specify a block type of your own choice in the config.yml file with LockBlock: <material-name>.
Permissions: jukebox.admin: op A player will require this permission, or ops, to start or stop an always-play jukebox.
Setup
To set up the Jukebox Changer, you must place a single chest next to the jukebox. Note that double chests are not explicitly supported at this time. If a doublechest exists next to the jukebox, the changer will only look at the side of the doublechest that is adjacent.
Adjacent means next to one of the four Jukebox faces or underneath it. Diagonal placement of the chest containing the record selections is not supported.
Place one or more records in the adjacent chest. An empty chest does not define a JukeboxChanger, and any Jukebox placed next to an empty chest will function as an ordinary jukebox until you place records in the chest and start the Jukebox.
Placing the lock block (default is a diamond block) underneath the Jukebox defines it as an always-play box. Normally, a jukebox will stop playing when its containing chunk is swapped out, such as when the player wanders too far away. This behavior prevents the world from being littered with jukeboxes still playing merely because the user never bothered to turn it off, and saves the time the server would spend processing these active jukeboxes. An always-play jukebox, on the other hand, remains in standby mode when its chunk is not active, and resumes play when its chunk is reloaded. If the server is halted while an always-play jukebox is playing, its location is saved in an autoplay: list in the config.yml file, and the box will be automatically restarted when the server is restarted. A player must have admin permission to start or stop an always-play jukebox.
Note that when a player re-approaches an already playing jukebox, due to limitations in the minecraft code itself, the player will not hear the jukebox until it starts another record. This is not because of the plugin code and cannot be fixed.
Operation
To begin play, right-click the Jukebox. It doesn't matter what you're holding. In particular, you need not (and should not) be holding a record when right-clicking on the jukebox. Hopefully, if you're holding a record when you right-click, the plugin will ignore the record you're holding, as only records in the feeder chest will be played. Right-clicking while the Jukebox is playing will skip to the next record.
To stop play, left-click the Jukebox. This differs from standard Jukebox behavior where a right-click is used to both start and stop play. Also note that there is no "eject" function, and the JukeboxChanger will not discharge any record it uses from the chest.
To change the JukeboxChanger's play list, first stop the Jukebox. Then you may freely add to, remove from, and alter the sequence of records in the feeder chest. Start the JukeboxChanger after making your changes to the record selection. Note that the JukeboxChanger will ''ignore'' any changes to the contents of the feeder chest while it is playing records. The JukeboxChanger loads the records in the chest into its memory when starting play, and ignores the chest until the jukebox is started again.
Using Redstone
A jukebox changer can be started with a redstone signal. Just connect redstone wire (redstone dust placed on top of a block) to any face of the jukebox. A redstone signal will start jukebox play. Dropping the signal will NOT stop the jukebox; it will continue playing until the containing chunk is swapped out, or play is stopped by left-clicking (punching) the jukebox.
Note that redstone can start an always-play jukebox without regard to jukebox.admin permissions, since redstone signals are not directly associated with any player. If you don't want arbitrary people starting your always-play jukebox, either don't use redstone or restrict access to the redstone switch.
Normal Jukeboxes
A normal jukebox is considered to be any jukebox without an adjacent chest, or where any such chest is empty of records. A normal jukebox will operate like any conventional Minecraft Jukebox. You must right-click while holding a record to start play. It will stop play when the record ends, and then remain silent. You must right-click again to eject the record.
Does not work in 1.13.1
Awesome plugin! :D
5 out of 5 stars!
@Jones988
Good suggestion. I'll plan on it.
Please add ability to change the duration of each song before skip, in case server uses a resource pack that changes the songs.
Thank you in advance.
The newest version, 2.1, supports always-play behavior. Please review "Setup" above for how to create an always-play jukebox.
@Jones988
The newest version for 1.8 doesn't have support for alwaysplay but does accept redstone signals. In principle you could use redstone to trigger the jukebox playing, but you're right, you would need some sort of permission structure to block players from stopping the jukebox. I don't think you'd want to block players from stopping -any- jukeobx including their own, so there would need to be a way to attach this restriction to a specific jukebox. I'll take your request under advisement.
Could you add some permissions? One for playing and one for stopping? I want to have music at spawn, but I don't want players to stop it.
@alex11492
Yes, the plugin supports use with multiverse, and is able to play jukeboxes in any world. You may be noticing that the jukebox automatically ceases play when the chunk containing the jukebox is no longer in memory, and doesn't restart when the chunk is reloaded. The previous version had an 'alwaysplay' function but has been dropped. However, you can use redstone to activate the jukebox when a player trips a signal, such as with a pressure plate or tripwire. You shouldn't have to break the jukebox to get it to play again, just right click it or send a redstone signal.
Does this have multiverse support because I am using multiverse and the tardis plugins. When I leave the Tardis(which is its own world) and then go back in the disc isn't playing anymore. I have to break the jukebox and place a new one to make it work again.
Any help would be appreciated
@JohnGuru
Make redstone connected note blocks the remote speakers! You could have it so a signal from the left of the jukebox is the skip and a signal from the right is the stop/play :3
Even though the plugin works in 1.6.2 just fine, I'm planning to add some updates when I get around to it. These include - the ability to use remote "speakers" with a master jukebox so they all play the same thing at the same time - Right-clicking on an active juke box to make it skip to the next record - Using redstone signal to start the jukebox or skip records
@kylemandu
It works in 1.6.2 fine.
I LOVE THIS PLUGIN!!! PLEASE UPDATE!
Hey,
Looks like this plugin doesn't save the location for autoplay, it shows:
"autoplay:
locations:"
and that's it, doesn't play on startup.
What's the format of the location? So I can put it in manually, thanks
Thank you for this update; this is the most charming plugin, I really love the atmosphere it gives my spawn point. Thanks again!
@joehot200
I've thought about using a config.yml to store alwaysplay jukeboxes so that they could be automatically started when the plugin is loaded. Because of your situation, I'm going to turn up the priority of this enhancement request. Maybe in a couple of weeks ...
@Shadico
The plugin won't recognize a jukebox as a jukeboxChanger unless there's a chest on one of its four sides, immediately adjacent to it, or above or below the jukebox. The chest must contain one or more records for it to play. The plugin does not provide records. You tell the player what records to play and in what order by storing the records in the chest. Please note that a double chest is treated as two chests, and only records in the side next to the jukebox will be detected. Are you providing records to the player in this manner?
@Shadico
Hmm, dosent do that with me.
(well it does but just rarely)
Hmm, try holding a disc in hand at the time?
Whenever I right-click the jukebox it just spits out the disk I put in it! It's not possibly for me to get the plugin to work because of this! Any ideas on how to fix this? :(
Could you Make it automatically start playing? people keep turning it off, so i had to place it under spawn, but then it dosent start playing!