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
-
View User Profile
-
Send Message
Posted Mar 5, 2013You can add a section for "Spout"?.
You can base it in this plugin to create ambient sounds:
http://forums.bukkit.org/threads/fun-ambientspout-wip-v1-0-2-custom-ambient-music-looping-sound-effects-spout-1-2-5-r4-0.51417/
Is open source
-
View User Profile
-
Send Message
Posted Mar 5, 2013this keeps popping up in the console: 05.03 00:57:36 [Server] SEVERE Could not pass event RegionLeaveEvent to RegionJukebox v1.22
-
View User Profile
-
Send Message
Posted Mar 4, 2013@ABCRic
I looked into it and honestly can't decide what's wrong. I might have fixed it, but I'm not sure. Hopefully 1.23 update will fix that and the multiplayer problem Rasmenar had.
-
View User Profile
-
Send Message
Posted Mar 4, 2013@unga23
Im getting the same exact error message when ever I start my server.
-
View User Profile
-
Send Message
Posted Mar 4, 2013I am also getting a null pointer exception on RegionLeaveEvent when leaving any region. It doesn't look like it has any effect but since it's on RegionJukeboxListener.java:70 it might interfere with song looping task cancelation.
-
View User Profile
-
Send Message
Posted Mar 4, 2013@Rasmenar
1) That is how I made the plugin. Those are not issues. 2 & 3) If you can find a way to make a jukebox in-game to not fade when a player walks away from it, please let me know. Otherwise, the limitations of the game will not allow me to keep the music from fading. 4) I didn't even realize that was an issue. I will try to fix that as soon as possible.
-
View User Profile
-
Send Message
Posted Mar 4, 2013@unga23
First off, I have to congratulate you on reading previous comments. Some people can't figure out how to do that.
Okay, so something is definitely up. What were you doing at the time this error occurred? If you could explain the region setup you had for the region this error occurred in? Is the error limiting the functionality of the plugin in anyway?
-
View User Profile
-
Send Message
Posted Mar 4, 2013@photocritic Same problem!
2013-03-04 14:49:01 [SEVERE] Could not pass event RegionLeaveEvent to RegionJukebox v1.22 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at com.mewin.WGRegionEvents.WGRegionEventsListener.updateRegions(WGRegionEventsListener.java:182) at com.mewin.WGRegionEvents.WGRegionEventsListener.onPlayerMove(WGRegionEventsListener.java:84) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:229) at net.minecraft.server.v1_4_6.Packet10Flying.handle(SourceFile:136) at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:291) at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:122) at net.minecraft.server.v1_4_6.ServerConnection.b(ServerConnection.java:54) at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:629) at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:228) at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:517) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:447) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) Caused by: java.lang.NullPointerException at com.gmail.kyle.huntsman.regionjukebox.RegionJukeboxListener.onRegionLeave(RegionJukeboxListener.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339) ... 23 more
-
View User Profile
-
Send Message
Posted Mar 4, 2013I've been looking for a plugin similar to this for a LONG time now. There is only 1 feature that I'd love you to add.
This may take a lot of work, but I think that the end product would be well worth it. Would you be able to tie this plugin in with a client-side mod that would allow you to specify a custom sound track, that is then played within a region? For example:
You enter somewhere that is meant to be a tavern/pub. You walk in, and then (From the custom sounds mod) you begin to hear people talking, drinks begins poured, and just a general pub atmosphere, from a custom sound file that would have a specific name (Stated by the command) when entering and leaving the region.
This plugin is the closest I've seen anyone get to the aim that I've been looking for, so if a feature like this could be added, then this plugin will just be amazing for most PR and RPG servers to use.
Mallander
-
View User Profile
-
Send Message
Posted Mar 3, 2013Cool plugin, but a few issues.
1) Every time a player enters the region, the music starts. When they leave, it stops.
2) The music's point of origin is from the last player who entered the zone.
Currently, due to those two problems, I won't be using the plugin... kinda irritating to have the start/stop going on, and for the music to fade when moving through larger areas.
As far as the music triggering as multiple people enter and exit the zone, couldn't you just make a check to see if 1) the music is already playing when they enter, and 2) if there are still players inside when they leave?
-
View User Profile
-
Send Message
Posted Mar 3, 2013@LeeEwing02
Can't tell if you're being pun-y, or serious. Lols. If you're being pun-y, :D. If you're serious, then that's not my side, it's yours.
-
View User Profile
-
Send Message
Posted Mar 3, 2013cant hear it
sounds like a good plugin tho
-
View User Profile
-
Send Message
Posted Mar 3, 2013@JeikHardy
I can definitely add that!
-
View User Profile
-
Send Message
Posted Mar 3, 2013add a "/rj reload" command for admins in your next features if you can pls, and thanks for the update. :D
-
View User Profile
-
Send Message
Posted Mar 3, 2013@IngrownPenguin
I actually have no idea why this would be happening, as this has never happened in my testing. You could try waiting until the 1.22 update which should be out soon. I will look through the code and see if there's anything obvious I forgot. I would love a video of the plugin! :D
-
View User Profile
-
Send Message
Posted Mar 3, 2013@S1lverK3y
Thanks! Glad you enjoy it! :D
-
View User Profile
-
Send Message
Posted Mar 3, 2013@photocritic
Okay, the only idea for this error is that the LoopMusic configuration was either empty, spelled wrong, or not true or false as you left a region. If you could maybe check that and see if correcting it fixes your error, that would be wonderful. And please let me know the result.
EDIT: Actually, I just fixed the potential problem and it will be effective in the 1.22 update. Another problem I thought of was if it was a region inside a region, and each region had a different record assigned to it, it might not work correctly. I'd have to think of a work around for the way that currently works.
-
View User Profile
-
Send Message
Posted Mar 3, 20132013-03-03 17:02:33 [SEVERE] Could not pass event RegionLeaveEvent to RegionJukebox v1.2
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at com.mewin.WGRegionEvents.WGRegionEventsListener.onPlayerQuit(WGRegionEventsListener.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at net.minecraft.server.v1_4_R1.PlayerList.disconnect(PlayerList.java:209)
at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:717)
at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:295)
at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113)
at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39)
at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598)
at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.NullPointerException
at com.gmail.kyle.huntsman.regionjukebox.RegionJukeboxListener.onRegionLeave(RegionJukeboxListener.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
... 23 more
-
View User Profile
-
Send Message
Posted Mar 3, 2013Awesome plugin!
-
View User Profile
-
Send Message
Posted Mar 3, 2013Hey, i wanted to make a video for your plugin but it doent seem to work correctly?
i set it up but when i walk into a region nothing happens
if i log out and into the game and am in the region it will play
Any help?
Thanks