RegionJukebox
Is the default Minecraft music a little dull? Would you like to add atmospheric music to your regions? Now you can, with RegionJukebox! Setup your cemeteries with scary organ pipes, or your relaxing vacation home with nice chimes. Just define a region with WorldGuard and then assign either a Minecraft record or a custom resource pack sound to the region. Whenever a player enters the region, the music will play for that player!
Bring in Version 2.0! :D
Holy crap people! I finally did it! Version 2.0 is here! The one feature everyone has been asking for is here now. Drum roll please... Custom music! You can now assign regions to play sounds from resource packs. Just use the same name you use in the sounds.json file in the command. For those that still use the beautiful default Minecraft records, don't worry, you can still use those.
Music. Is. Everywhere. EVERYWHERE! The music now plays at a configurable "speaker" block in the region. If you configure the region to play from a note block, then the music will play from every note block in the region. This way you can have it play from different spots in the region, or even have it play from every grass block (I suggest not doing this, it's pretty intense).
Looping works wonderfully now. Looping is no longer a global setting, and can now be configured per region. The only thing that is needed to loop is the length of the music being played. For custom sounds, you're going to have to guess and check a little bit to get it right. For those using default Minecraft records, you don't even have to worry about it. The plugin already knows the lengths of each record, so you can just leave that argument out of the command.
How to Install:
- WorldGuard IS NEEDED
- WorldGuard Region Events IS NEEDED
- Just drop jar into the plugins folder and you're set!
Current Features:
- Assign music to predefined WorldGuard regions
- Play either Minecraft records or custom resource pack music
- Loop the music! Configurable per region
- Assign a "speaker" block to play the sound at in the region
- Auto-updating
Planned Features:
- Got any suggestions? Go ahead and tell me about them!
Commands:
- /rj help - Shows a list of commands
- /rj recordlist - Shows list of records to play
- /rj regionlist - Shows list of regions with jukebox enabled
- /rj remove - Removes the jukebox from a region
- /rj reload - Reloads configuration file
- /rj set - Sets the region's jukebox music
For additional help with the commands, just type out the command in chat, and their usages along with what each parameter means will be shown.
Permissions:
- regionjukebox.command.rj - Allows the use of the rj command
Source
If you really want the source code, go ahead and decompile the jar file. Really, I don't care. Do what you want!
QA:
Q: Is it possible to make the music play throughout the whole region?
A: Yes! Version 2.0 fixed that! You can configure a "speaker" block to play the sound out of. You then place the designated "speaker" block all around your region.
Q: Can you make the music fade when a player leaves the region?
A: Kind of... Depends on if you're using the default Minecraft records or not. If you're using the records, they stop pretty abruptly. If you're using custom sounds, I actually can't stop those from playing. So as the player walks away from the sound source, it will fade away. If you guys want the records to act the same way as the custom sounds, let me know. I can definitely do that.
Q: Can you add custom music?
A: Yes! Version 2.0 to the rescue again! You can now configure regions to play custom resource pack sounds. Just use the same sound name as the sound.json file.
Q: Can you fix the region within a region thing?
A: I could, but don't want to. That goes beyond the scope of simplicity. That also gets into region detection and that's a lot more complicated.
Another thing that comes up a lot is people telling me the plugin is unresponsive or the events stopped working. I would like to let you know how I handle these. I first see a comment and trying to recreate the problem, load the freshest plugin onto my server. My dev server is always, ALWAYS, running the latest build to keep up with the client. The plugins however, are not, as plugins do not need to run the latest build to stay stable. I then try to recreate the problem using the current available plugin version and the current server. Most of the time, it works. If something doesn't work for you, you can try to delete the plugin and the data folder, and reinstall a fresh copy. If the problem persists, please explain exactly what the problem is and/or a step by step on how to reproduce the problem. Telling me "it doesn't work" doesn't help me at all.
Changelog:
- Version 2.0: *Latest Version*
- You can now play custom music! So excited for this!
- Looping is now configurable on a per region basis
- You can now assign a "speaker" block to play the music out of
- Version 1.6:
- Updated to 1.7.9
- Fixed a bug where leaving a region wouldn't stop the music
- Preparations were made for version 2.0!
- Version 1.52:
- Updated to 1.6.2
- Version 1.51:
- Fixed problem with not being able to remove configured regions
- Version 1.5:
- Rewrote plugin to save regions to config file. No more serialized objects!
- Version 1.45:
- Fixed a metadata error I came across
- Version 1.44:
- Added console log when user doesn't have permission to use command
- Version 1.43:
- Couple minor plugin.yml changes and console spam fixes
- Updated to 1.5.2.
- No changes to functionality
- Version 1.4:
- Regions are saved differently. No longer in unsightly text file. Please delete the text file!
- Version 1.31:
- Updated to 1.5.1
- Version 1.3:
- Added permissions
- Version 1.23:
- Added /rj reload command to reload the configuration file
- Fixed a null issue when leaving a region
- Music replays at the players location every loop cycle
- Version 1.22:
- Fixed console command usage
- Fixed a metadata issue when leaving a region
- Version 1.2:
- Added looping music
- Add configuration toggle for looping music
- Command syntax was slightly changed to accommodate the change in code for looping music
- Version 1.1:
- Fixed bug when updating a region with a new sound
- Added notification to updater so the user knows the plugin is updating itself
- Version 1.0:
- Initial Release
Thank's FunnyGopher,
Yes, I do have WorldGuard & WGRegionEvents installed on my Bukkit 1.5.2 BETA R0.1 Build. I also updated to the 1.41 version of your plugin. Now that i read that I downloaded the wrong version, I'm downloading V1.43. I got confused when it said it was released 3 days ago and it says it's compatible with Bukkit 1.4.7. I thought it was an error on your part and i thought you meant to put Bukkit 1.5.2 Beta R0.1. I don't know if it's a problem with MCMyAdmin, it says it updated for 1.5.2 but says the latest version is 1.4. So, I have to install it via Webmin. (Kinda Like FTP if you dont know what the is.) I installed it and i still don't get anything!! I have the latest version installed (V1.43). I even took the time to update my WE and my WG, but that didn't seem to do it. Is there any conflicting plugins you have in mind? And BTW there are no errors whatsoever in the console it says it enabled and then does this to me. All commands are ineffective.
@Hawkeyestrike
Do you have WGRegionEvents and WorldGuard installed? Are there any errors showing up in console when you try to run a command? I can't help you because I don't have any information regarding your specific situation. Help me help you. :)
Is it just me or can no one type "/rj help" and have anything come up?
@shaan94
It would be a problem with WGRegionEvents. When you teleport in or out of a region, it doesn't recognize it and doesn't trigger the events. Therefore, walking into a region and teleporting out doesn't trigger the, "leaving region, please stop music" event, so the music doesn't stop.
When someone teleports to a different world whilst music is playing, the music stops, but then the same music starts again in a different world with no regions or nothing related to region-jukebox.
Is this a problem with WG region events not recognising peoples location?
@Felix_The_Ghost
You're really adamant about adding this feature, based on your comments from Region Preserve. Is it possible, yes. Am I going to make it compatible with Region Preserve? No. Worldguard is more widely used than Region Preserve, and it doesn't make sense to make my plugin compatible with a plugin that not only a handful of people use, but maybe one or two of those people who use it with my plugin. It's not a feature general enough to benefit the majority of the community.
Plus, honestly, I don't use Region Preserve. The plugins I make, I make for myself and close friends because we'll find it fun or useful. If I read a suggestion that I also agree will make the plugin better, then I'll add it.
Not trying to bash on you, really. I'm sorry if it came out that way. I just don't think it'll be useful to myself.
Is it possible at all to create compatibility with Region Preserve ?
@zade_
Thank you very much. There is a server call that I've looked into that could potentially make the music follow the player, but it doesn't work on anything other than like, pig noises (It's not pig noises, but still). If this was changed, it would work for sure.
Also, thank you for providing the error log. It looks as though you might have entered a region, restarted the server, and then left the region, causing metadata to disappear and throw the error. Whether that was the case or not, I provided a check for this particular error and have fixed it. Currently uploading the fix. Not a big problem, just saves on a little console spam. :) Thank you again for being helpful.
I really love this idea, but it ends up being a little funky for me without it following the player. Hope you're either able to figure it out, or the MC devs offer more support for this kind of functionality. I'll keep an eye on this plugin for sure.
Here are a few errors I noticed in my logs, although it seemed to be working fine at the time:
@CatButler
Thanks! Glad you like it so much. And I'm happy about the positive feedback! :D Most people who comment are having problems and make me feel as if the plugin is never working. So thank you.
@SpotBr
Yes, I think I have had this come up before. That, as sad as it is, is not within my control. WGRegionEvents takes care of the region entering and leaving. Sorry. :(
It won't let me do any commands. When i type any command it doesn't do anything. no response or anything. It's desperately needing an update. PLEASE UPDATE!!!!
Will donate if there's an update!
(That is if you have a donation system set up!)
If you teleport into the area, the music does not start. : (
This plugin is awesome :D Can't wait to use it on my server.
Hi I run a server and was very excited to start using this plugin but it doesn't work at all.Doing /rj won't do anything.
@Supercrazyninja
Thank you very much. I will look into it. Probably just needs updated. :p
The plugin is no longer responsive to the /rj commands. Needs an update. Plugin version: 1.4 Craftbukkit version: API version 1.5.2-R0.2-SNAPSHOT
@luckydog32
Haha, what? If you add sound to a region go inside the region, and then delete the region, I don't think it will stop. But if used properly, it should stop.
The music never stops, ever...
@CraftBonbon
Thanks for the help!
And yes, teleportation into the region doesn't work as teleporting into a region doesn't trigger the region enter event in WGRegionEvents.