JukeLoop
[ English | Français ]
Accept no substitutes. This is the Jukebox plugin you've been looking for. JukeLoop makes Minecraft's jukeboxes incredibly cool. They will constantly play on a loop, optionally cycling through discs in a chest or attached hopper. They automatically start when your server restarts and when any player is nearby. Furthermore (and new in version 0.1.4) disc changing can be triggered by a redstone pulse!
Features
- Built-in auto-update functionality
- Records will start playing automatically even after a server restart. (locations of jukeboxes stored in config)
- Punch the jukebox to skip the song, or apply a redstone pulse!
- Rotate through records in a chest placed adjacent to the jukebox
- jukeboxes will place played discs in a hopper if there is one directly below
- jukeboxes will take discs from an attached hopper
Commands
- None
Permissions
- 'jukeloop.use' - players with this permission will automatically have their jukeboxes repeat.
Tutorial
Source Code & Development Builds
Source code is available on Github
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
Other Plugins
- PortableHorses - your trusty steed in your back pocket.
- Build-in-a-Box - self-constructing buildings that can be picked up and relocated.
- Scribe - Transfer enchantments from items to books using an anvil
- EnhancedFishing - Adds tons of fishing enhancements including complete control over the bite chance.
- PotatoBombs - Allows players to craft poisonous potatoes into devastating and hillarious magical landmines.
- SilentAlarms - Makes note blocks silent except to select people, who can hear them at any distance.
- Saddlebags - Adds an inventory to saddled pigs.
- SalvageSmelter - Allows furnaces to smelt down tools and armor.
- Compressors - Turn hoppers into 'block compressors'.
- Autocrafter - Turns droppers into redstone powered crafting tables.
@OldPrelude
sure you can email me a patch, I'll have to look it over and do some testing to make sure it doesn't interfere with other functionality. I'll PM you my email address.
Is it ok if i update it and push / e-mail the changes? i just dont have GitHub (i used bitbucket)?
Ok i had this idea, if you like to add it; how about when the loop event is initiated it checks if the jukebox is powered.
If not, it loops. If it is, it doesnt loop.
Alternatively, add a config to negate this. e.g. jukebox_loop_negate: true
And then it loops when powered and doesnt when not powered
And where it affects the "Change disc" feature. You could maybe check for a pulse, e.g. if power was on and then off or visaversa within the last 1 or 2 sec, change disk.
@rctfan1999
not a secret, it's listed under 'Features' on this page :)
I noticed something, when I place a jukebox and put a CD in, and I place a lever near the jukebox and pull the lever, the jukebox changes CD's. Is that a secret feature?
@cloclo8003
that's a minecraft bug unfortunately. the server (and thus, jukeloop) has no way to know if your client is currently playing music. The bug is in the client, it should play game music when a jukebox is playing.
On minecraft 1.7, the normal minecraft music plays at the same time as the jukebox. Is this bug caused by bukkit or jukeloop?
Nobody else can hear my jukeboxes and I can't hear theirs... I also can't have more than one of my own going at a time (despite distance, 1000 blocks away even) without the one I am away from stopping... Can someone help?
@metalhedd
During play, at one point, the config file looked like:
auto-update: true
record-durations:
GOLD_RECORD: 178
GREEN_RECORD: 185
RECORD_3: 345
RECORD_4: 185
RECORD_5: 174
RECORD_6: 197
RECORD_7: 96
RECORD_8: 150
RECORD_9: 188
RECORD_10: 251
RECORD_11: 71
RECORD_12: 235
debug: true
jukeboxes:
- Fresh Build_-28_104_160
and at present, it has changed to show:
jukeboxes: []
@metalhedd
I have sent you the PM(s). The first one, I should have previewed - the format was less than desirable. The second PM cleaned it up.
On the first startup, I hit two jukes.
When I rejoined the server, the music did not play. I then hit one juke.
I restarted again and no replay.
@metalhedd
I actually had a chance to test that theory too, and still no luck reproducing the issue.
I'm not sure if you have any slow times on your server, but if you do there's a test you can try that might shed some more light on the situation.
first. shutdown your server and delete your server.log file. next, add
debug: true
to your jukeloop config.yml file. (this adds a TON of spam to your log files so you wont want to let it run like this for very long.) log in and find a jukebox, make it loop, then log out and wait 5 full minutes to allow the song to end, and the plugin to save its data. next restart the server (still with debug: true) and log in.now the jukebox is either looping, or it isn't. (hopefully it is)
shutdown again. remove the debug option, and PM me the server.log file.
bonus points if you can do this on a fresh craftbukkit install with minimal plugins.
@der_Kernschatten
Okay my next theory is something to do with the chunk unloading then. I'll investigate that after work today, hopefully we can have it sorted for tomorrow
@metalhedd
"The data is saved roughly every 5 minutes, and on server shutdown" - at the time of the last restart, the last user had left about an hour prior. My thinking is that it would have saved and the chunk unloaded regardless of how the server shut down. However, this is what I observe:
Some plugins have two lines stating "Disabling [...]" and "[...] disabled." I don't see JukeLoop's final line to say it was finished.
2013-11-07 00:59:22 [INFO] [JukeLoop] Disabling JukeLoop v0.1.11
2013-11-07 00:59:22 [INFO] [SlimeChunkDetector] Disabling SlimeChunkDetector v0.3
2013-11-07 00:59:22 [INFO] SlimeChunkDetector 0.3 disabled.
... but I have a fair number of plugins that do one or the other action listed above. As best I can tell, this is normal.
Later it continues on with:
2013-11-07 00:59:22 [WARNING] DSCT: Socket closed
2013-11-07 00:59:22 [INFO] Closing listening thread
2013-11-07 00:59:22 [INFO] Saving players
2013-11-07 00:59:22 [INFO] Saving worlds
Again, as best I can tell, this is normal.
Everything else is clean.
@der_Kernschatten
No luck, it seems to work perfectly for me. By any chance is your server not shutting down cleanly? The data is saved roughly every 5 minutes, and on server shutdown, so if a jukebox is started, and then the server is uncleanly shut down before the next save, it would cause the jukebox not to start up again when the server comes up. This sounds like the most likely cause. are there any error messages (not necessary from jukeloop, but anything at all) during shutdown?
@metalhedd
If you can't, let me know what I can do to help. I have tried this as both Op and non-Op with permissions.
@der_Kernschatten
thanks, i'll do some more testing and see if I can reproduce the issue tonight
@metalhedd
Alright. This definitely fixed that particular bug. No more error messages.
However, this feature is not working: "Records will start playing automatically even after a server restart."
If I go to that Juke and punch it to change the disk, it will work and continue to work until a restart.
@metalhedd
Thanks. I'll give it a try once it's approved and let you know.
@der_Kernschatten
Just uploaded 0.1.11 which should fix it.
I received the following error message today:
2013-11-04 18:52:06 [INFO] [JukeLoop] Enabling JukeLoop v0.1.10 2013-11-04 18:52:06 [SEVERE] Error occurred while enabling JukeLoop v0.1.10 (Is it up to date?) java.lang.NullPointerException at com.norcode.bukkit.jukeloop.LoopingJukebox.getAt(LoopingJukebox.java:35) at com.norcode.bukkit.jukeloop.JukeLoopPlugin.loadData(JukeLoopPlugin.java:153) at com.norcode.bukkit.jukeloop.JukeLoopPlugin.onEnable(JukeLoopPlugin.java:98) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.java:284) at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:266) at net.minecraft.server.v1_6_R3.MinecraftServer.l(MinecraftServer.java:315) at net.minecraft.server.v1_6_R3.MinecraftServer.f(MinecraftServer.java:292) at net.minecraft.server.v1_6_R3.MinecraftServer.a(MinecraftServer.java:252) at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:152) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:393) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
The only theory I have is that it had to do with an Op setting their stuff up, DeOp themselves, then their base permission not having "jukeloop.use". I fixed the problem by deleting the config file and fixing the permissions.
Disregard that theory. It broke on restart again. We are running recommended build 2918 (1.6.4-R2.0).