Inactive [FUN] BCMusic v3.2- Custom Music w/ Spout [1000]

Discussion in 'Inactive/Unsupported Plugins' started by IC3D, Jun 28, 2011.

  1. Offline

    IC3D

    BCMusic: A custom music plugin w/ BukkitContrib Spout
    Version: 3.2
    This is a super simple plugin. It is an easy to configure music plugin that takes advantage of BukkitContrib to play music, either only hearable by the player or globally playing the music. This one is all in the configuration, so click that spoiler down there :)

    Requirements:
    Features:
    • Play custom music!
    • Play custom music through jukeboxes (volume varies by distance just like regular ones)!
    • Permissions support!
    Configuration:
    config (open)

    The default configuration looks like this:
    Code:
    Music:
        tothaface:
            Node: BCM.tothaface
            GlobalNode: BCM.Global.tothaface
            URL: http://url here
    JukeBoxes:
        iron_ingot:
            Node: BCM.nodehere
            URL: http://url here
    
    To add a song, add a name you want (in lowercase) like tothaface. Then add the node, global node, and song url (it must be on the internet, and .ogg, .wav, or .mid). The commands do the rest.

    Commands:
    commands (open)

    There is only one command, but the arguments decide what music to play. The syntax looks like this:
    /bcm <song> <global>
    Replace song with a name of a song that you set in the config, for example, tothaface. You can just type /bcm tothaface to hear the song yourself. Or, if you have the global node, you can type /bcm tothaface global, which will play the song for all players on the server with Spout installed

    JukeBoxes:
    jukeboxes (open)

    Code:
    JukeBoxes:
        iron_ingot:
            Node: BCM.nodehere
            URL: http://url here
    After you put an actual music file URL in the config, you can use it like a regular jukebox. Just place a jukebox, and right click it with the item defined in the config (default iron_ingot). The song will play like a regular jukebox song, and volume will vary by distance. When you left click the jukebox your item is returned.

    Downloads:
    The source code is included in the .jar

    Changelog:
    Version 3.2
    • Added /bcm list to show all available songs.
    Version 3.1
    • Changed "You don't have BukkitContrib installed" to Spout. (I forgot)
    Version 3.0
    • Updated to Spout, left the name the same for simplicity's sake
    Version 2.0
    • Added jukeboxes
    Version 1.0
    • Official Release
    Credits:
     
  2. Offline

    jascotty2

    @captainawesome7
    worked on it for a little, and this version i made (attached) fixes all but the stopping music on eject (spout doesn't seem to support yet)

    couldn't really make the names case-insensitive, so made them accept uppercase (if copy-paste from bukkit's javadoc)
    data values can be specified by adding _# for data (ink_sack_4 for lapis)
    also accepts numerical item ids
    also a few other improvements.. i'll leave you to see if you like those

    can't really use git for putting in a source pull request, since you don't have the source listed (only in the jar)

    edit: fix for item damage
    fix for item ids: nodes must begin with "item" (eg. "item351_4")
     

    Attached Files:

  3. Offline

    Frostbreath

    You're most likely already aware of this, but this plugin no longer works with Spout 1.0.2 and CB 1060. Duh. :p
    Error log in case you need it:
    Code:
    2011-08-16 15:12:03 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bcm' in plugin BCMusic v3.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:435)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.UnsupportedOperationException: All audio files must be ogg vorbis, wav, or midi type
        at org.getspout.spout.sound.SimpleSoundManager.playCustomFile(SimpleSoundManager.java:224)
        at org.getspout.spout.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:158)
        at org.getspout.spout.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:153)
        at org.getspout.spout.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:148)
        at org.getspout.spout.sound.SimpleSoundManager.playCustomMusic(SimpleSoundManager.java:143)
        at me.ic3d.bcm.BCMcmd.onCommand(BCMcmd.java:44)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 13 more
    I now see it says the files must be in .ogg format etc. However, the file that I use (uploaded on 4shared) is in .ogg format. Here's the config file as well, in case of...
    Code:
    JukeBoxes:
        iron_ingot:
            Node: BCM.nodehere
            URL: http://URLHERE
    Music:
        rainy:
            Node: BCM.rainy
            GlobalNode: BCM.Global.rainy
            URL: http://www.4shared.com/audio/FXY8-iTe/369944_Pirates_Nest__Full_vers.html
        tothaface:
            Node: BCM.nodehere
            GlobalNode: BCM.Global.nodehere
            URL: http://URLHERE
     
  4. Offline

    captainawesome7

    If you actually took the time to read through the error you would see that it clearly states that Your audio files must be in ogg vorbis, wav, or midi. You can't have an html document play as a song...
     
  5. Offline

    Frostbreath

    I'm very sorry your highness. I shall now follow your orders and find another location to get the music file uploaded to.
    EDIT: It works! But... Looks like my awesome high-end computer can't handle the plugin downloading music. The server goes nuts. So I'll test it on my dedicated server once they updated the plugin over there to this version. I want this badly!
     
  6. Offline

    Wahrheit

    @IC3D Does this support .pls Shoutcast streams?
     
  7. Offline

    captainawesome7

    No
     
  8. Offline

    Matt Gill

    I have a song that's playing just fine
    Edit: Nevermind the first song isn't working either, I think I might have messed up the config I'm going to check it .
    Edit2: Checked it on http://yaml-online-parser.appspot.com/ and it came out fine.

    Then I added another and I get this:
    Code:
    15:10:38 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bcm' in plugin BCMusic v3.1
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
    	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
    	at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    	at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:435)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
    	at java.util.LinkedHashSet.<init>(LinkedHashSet.java:168)
    	at com.nijiko.permissions.Entry.has(Entry.java:119)
    	at com.nijiko.permissions.Entry.hasPermission(Entry.java:99)
    	at com.nijiko.permissions.ModularControl.permission(ModularControl.java:318)
    	at com.nijiko.permissions.ModularControl.permission(ModularControl.java:307)
    	at com.nijiko.permissions.ModularControl.has(ModularControl.java:300)
    	at me.ic3d.bcm.BCM.hasPerm(BCM.java:41)
    	at me.ic3d.bcm.BCMcmd.onCommand(BCMcmd.java:35)
    	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    	... 13 more
    
    
    It is in .ogg format just like the first song. Here is a link: http://dl.dropbox.com/u/29719029/Let's Dance To Joy Division.ogg

    Do I just have to restart the server? Here is my config:
    Code:
    JukeBoxes:
        iron_ingot:
            Node: BCM.nodehere
            URL: http://URLHERE
    Music:
        fermented:
            Node: BCM.fermented
            GlobalNode: BCM.Global.fermented
            URL: http://dl.dropbox.com/u/29719029/03-nofx-fermented_and_flailing.ogg
        joydivision:
            Node: BCM.joydivision
            GlobalNode: BCM.Global.joydivision
            URL: http://dl.dropbox.com/u/29719029/Let%27s%20Dance%20To%20Joy%20Division.ogg
    
    
     
  9. Offline

    captainawesome7

    Try changing the name of the song in the url to have no spaces.
     
  10. Offline

    Wahrheit

    Will it ever?
     
  11. Offline

    captainawesome7

    Ask Afforess or anyone that codes Spout, I have no idea.
     
  12. Offline

    Combat Wombat

    Any plans to allow users to add music to the list to be played on jukeboxes? Perhaps instead of activating with items, users could select the jukebox and use the "/bcm" command to select a song previously suggested a few posts up
     
  13. Offline

    captainawesome7

    I'll consider it. And yes /bcm list is on its way, unfortunately this plugin isn't the highest on my todo list.
     
  14. Offline

    IC3D

    Download v3.2
     
  15. Offline

    AcidicTaco

    ok this plugin nor any of the spout music playing plugins have worked for me that well really, basically doesn't play either it doesn't even download or it downloads and then doesn't play, are there any errors caused by file names, file size, or something else? Also currently I keep getting an error when trying to play music it says I do not have permission
     
  16. Offline

    Frostbreath

    Be a little more clear:
    1. What format is the music file? Should be .ogg, .midi or .wav. A .wav file is very large in size, so I use .ogg. Good quality and fast download.
    2. Which Permissions plugin do you have. I kind of get an internal error talking about hasPermissions. It works fine on my pb with Permissions 3.1.6, CB 1060 and BCMusic 3.1, but the internal error occurs on my dedicated server with Permissions 3.0a+MP, BCMusic 3.1 and CB 1060.
    3. Is the config file correct?
    4. Are you using Dropbox for your music files?
    I just ask these questions to get it more clear for the plugin developer, as he isn't the most friendly one I've met here.
     
  17. Offline

    AcidicTaco

    @Frostbreath

    yes I understand all of those basics, using .ogg's and essentials permissions (AKA group manager), I can try using dropbox I guess, but the fact that there is no v3.1 download link is my dead end
     
  18. Offline

    Frostbreath

    I think 3.2 works just as fine. By the looks of it, it changes nothing but adding a new command. :) Also, I'll try Essentials' Group Manager and see if it works for my server.
    Edit: I've used multiple Permissions plugins, including PermissionsEx, Bukkit Permissions and Permissions 2.7.7. All of them, except Permissions 2.7.7 return this message when trying to play a song: "You don't have the permission to play this song!" I inserted the nodes in the BCMusic config file correctly. I even tried to place permission nodes in the permission plugin file itself, but no result. Permissions 3.0a+MP (which is apperantly Permissions V2.7.7) goes even more nuts, giving me an oversized error:
    Code:
    2011-08-18 09:58:54 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bcm' in plugin BCMusic v3.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at java.util.StringTokenizer.<init>(StringTokenizer.java:199)
        at java.util.StringTokenizer.<init>(StringTokenizer.java:221)
        at com.nijiko.permissions.Control.permission(Control.java:354)
        at com.nijiko.permissions.Control.has(Control.java:260)
        at me.ic3d.bcm.BCM.hasPerm(BCM.java:41)
        at me.ic3d.bcm.BCMcmd.onCommand(BCMcmd.java:35)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    Maybe it's the cause of MultiPlay, the host where my server is located. BCMusic works perfectly fine and completely without troubles on my own PC running Permissions 3.1.6. I hope you can assist me on this, dear plugin developer. I would be delighted. :)
    PC versions:
    CB: 1060
    BCM: 3.1
    Spout: 1.0.2
    Spout client: 1.0.2
    Permissions: 3.1.6
    Result: Work perfectly fine!
    Dedicated server versions:
    CB: 1060
    BCM: 3.1
    Spout 1.0.2
    Spout client: 1.0.2
    Permission 3.0a+MP (which appears to be 2.7.7 for MultiPlay)
    Result: Giving me the error found above.
     
  19. Offline

    AcidicTaco

    @Frostbreath

    just tested it again, still doesn't work, Essentials hasn't been updated for Bukkit build #1060 so there could be an error there, but I doubt it since all my other plugins are working fine, you could upload your version of BCmusic that is v3.1 to mediafire, dropbox, or something
     
  20. Offline

    Frostbreath

    I could, but I'm not sure if the author would be happy if I upload his files and put the link here.
    Moar Edit: 3.2 works fine on my pc as well.
     
  21. Offline

    captainawesome7

    Nothing was changed from 3.1 to 3.2 with the exception of adding /bcm list. Nowhere on this thread does it ever state that this plugin supports GroupManager. This plugin was tested and confirmed working on Permissions 2.7.x and bPermissions, with cb build 1000 and 1060.
    As long as the files are previous versions and you don't claim them to be your own work, its fine. But, it is completely unnecessary as 3.1 to 3.2 only adds a few lines of code. As far as your MultiPlay problem, I'm pretty sure its a problem on the Permissions side of things. The plugin uses a hasPerm method, which checks to see if permissions is being used and then checks it. Based on the error, I'd say if you tried a different permissions system it would work, because the error isn't coming from me. It's coming from your permissions plugin.
     
  22. Offline

    Frostbreath

    Mmkay, I can try BukkitPermissions 1.1 again (if you meant that with bPermissions :) ). However, this gave me the "You don't have the permission to play that song!" error. I placed the nodes in BCM file correctly. Is there anything I should add? I tried using bcmusic.*, BCM.*, BCMusic.* in the permission.yml file, but it didn't help. Thanks for clearing this up for me. I know know where the error comes from!
     
  23. Offline

    captainawesome7

    bPermissions is the permissions plugin by codename_B, and it works. I'm pretty sure putting nodes in your permission.yml file doesn't do anything.
     
  24. Offline

    chuiby

    I am an admin on my server and i cant use the command wtf?
    I though admins had all permissions already... Please add wildcards and allow OPs to use this command
     
  25. Offline

    captainawesome7

    Nope. Read the OP
     
  26. Offline

    chuiby

  27. Offline

    captainawesome7

  28. Offline

    chuiby

    Nope both are 100%
     
  29. Offline

    captainawesome7

    It's your music.
     
  30. Offline

    chuiby

    I don't get it...

    As you can see here:
    http://screensnapr.com/v/XGvd83.png
    My music is on, my speaker are on, my volume mixer is 100% on, minecraft on my volume mixer is at 100%
     
  31. Offline

    BioRage

    Is it a .wav .midi or .ogg?
     

Share This Page