[INACTIVE] [FUN] RyveMusic v1.4.1 - Add your music in game [Spout] [1060]

Discussion in 'Inactive/Unsupported Plugins' started by timoun, Aug 13, 2011.

  1. Offline

    timoun

    RyveMusic v1.4.1 - Add your music in game

    Version: v1.4.1
    [​IMG]

    NEW: Play loop music !!!


    This plugin use Spout to add music in your server. You can play a music in global or for only player.
    But the plugin doesn't stop here, you can put music in a jukebox, play a burn cd into a jukebox, start the music of the jukebox with redstone. You can also make little shop to buy cd burn and put music in a region with worldguard.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Pour les francophones vous pouvez voir le topic sur minecraft.fr ici
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Requirements:
    Features:
    • lang.txt to translate in your own langage
    • Put music on a jukebox
    • play music for one player
    • play music for all players
    • Loop music in a region, on an NPC or a player
    • play cd burn into a jukebox
    • Start music from jukebox with redstone
    • (optionnal) WorldGuard to start music when player enter on a area and stop the music when he leave area
    • (optionnal) iConomy to create shop to buy a burn cd wich contains a music
    • (optionnal) Citizens to put music on a npc
    • Permissions support
    • Start sometimes a random music
    How does it work?

    To start the plugin you must have a file wich contains all url music who want to play in game and after that you to put the url of your txt file in setting.txt into RyveMusic folder.
    For exemple, i have a php file wich list all music from a folder and made a list of url. To access to this file you have to put the link in setting.txt, the link is: http://mine-elite.fr/musique/listmusic.php
    (this link is use by default on setting.txt file)
    Now you put the url into setting.txt, here:

    Code:
    ListMusic=http://mine-elite.fr/musique/listmusic.php
    //Set it to true if you want use URLs.txt
    useURLs.txt=false
    moneyName=dollar
    //If you have lag add and set this line to false:
    onMove=true
    //Add and set to false to remove random music
    randomMusic=true
    //set to false if you don't want playing loop music on an NPC
    loopNpc=true
    //set to false if you don't want playing loop music in a region
    loopInRegion=true
    //set to false if you don't want see a message when the music is playing
    playMessage=true
    
    you just have to put link in your file of url and the plugin does the rest

    If you have no web host you can just set useURLs.txt to true (to do that you need to stop your server, modify setting.txt and finally restart your server) when it's done you have to put your song URL into URLs.txt in RyveMusic folder like that:
    Code:
    http://mine-elite.fr/musique/A-H.Marlene.ogg
    http://mine-elite.fr/musique/A-H.house.of.rising.sun.ogg
    http://mine-elite.fr/musique/A-H.the.messenger.ogg
    
    you don't have to do any reload on your server just put url into this file and my plugin see modification ! :D

    IMPORTANT: music must have to be in .ogg, .mid or wav

    if you want my code of the php file you can have here:

    listmusic.php (open)
    PHP:
    <?php
    $folderName 
    'musique';
    $folder './';

    define("SERVERNAME"'http://'.$_SERVER['SERVER_NAME'].'/'$folderName .'/');
    $image_valide =  Array('wav''mid''ogg');

    if(
    $parcourir scandir($folder0)){
        foreach(
    $parcourir as $clef => $fichier){
            
    $pathinfo_fichier pathinfo($fichier);
            if (
    in_Array(strtolower($pathinfo_fichier['extension']), $image_valide))
        {
                echo 
    SERVERNAME $pathinfo_fichier['basename'];
                echo 
    "\n";
            }
        }
    }
    ?>



    Play music for a player or in global:
    to see all music in your server you have to use "/rm list" and the plugin list all the music from your file of url wiith an number on the left, this is the music number:
    /rm list (open)

    [​IMG]

    to start a music for your own you can use "/rm play <music number>", for start music for an other player you can use "/rm play <music number> <player name>".
    Exemple, to play A-H.marlene.ogg you must do "/rm play 1"

    you can stop music for you with the command "/rm stop"
    To play music in global use "/rm global <music number>"

    Now, with the release 1.4 you can loop play a music with the command "/rm playLoop <music number".

    Put music on a jukebox:
    To put music you must use the command "/rm setJuke <music number>" and hit a jukebox, the music is playing. If a player hit the jukebox the music is restart.
    After, put music on a jukebox, you can start music with redstone so you can use a jukebox in redstone circuit.
    To delete music from jukebox you have to break it.

    Put music in a region:
    To put music in a region you must have wolrdguard on your server.
    You can put music in a region with this command: "/rm setRegion <music number> <region name>"
    When a player enter the area the music is played and when he leaves the music stop.
    To remove music from a region use "/rm delRegion <region name>"

    Put music on NPC:
    You must have Citizens on your server.
    To put music on an NPC, you have to do a right click on your NPC like for citizens, when citizens send its message, now you just to perform this command "/rm setNpc <music number>".
    If you want remove a music from an NPC, perform this command "/rm delNpc" after you have selected your npc.

    Burn cd with shop:
    You must have iConomy to use that!
    To create a cd shop you have to take sign. On the first line you have to write RyveMusic, on the second the music number and on third line, the price.
    like that:
    shop (open)

    [​IMG]

    You can see the music name when a player hit with left click the sign.
    To buy a cd you have just to use right click on the sign and the cd is burn.
    You can see directly on your inventory the music name:
    music name (open)

    [​IMG]

    To play a cd you have to put your cd in the jukebox.
    If a cd is not burn a random music is played in the jukebox

    Commands:
    Command (open)

    • /rm global <music number> - play a global music
    • /rm play <music number> [Player] - play music for a player, if [Player] is empty it's play music for you
    • /rm playLoop <music number> [Player] - Loop play music for a player, if [Player] is empty it's play music for you
    • /rm stop - Stop the music only for you
    • /rm list - a list of your musics in the file of url
    • /rm setJuke <music number> - To put music on a jukebox
    • /rm setRegion <music number> <region name> - To put music into a region
    • /rm delRegion - To remove music from a region
    • /rm setNpc <music number> - To put music on an NPC
    • /rm delNpc <music number> - To remove music from an NPC
    • /rm reload - To reload setting file with your new configuration


    Vidéos:
    Video in french (open)


    Permissions node:
    Permission (open)

    -RyveMusic.playGlobal -- To use /rm global
    -RyveMusic.play -- To use /rm play
    -RyveMusic.list -- To use /rm list
    -RyveMusic.stop -- To use /rm stop
    -RyveMusic.setJuke -- To use /rm setJuke
    -RyveMusic.setRegion -- To use /rm setRegion
    -RyveMusic.setNpc -- To use /rm setNpc
    -RyveMusic.delNpc -- To use /rm delNpc
    -RyveMusic.haveShop -- To have the permission to create cd shop


    Configuration:
    Configuration (open)

    Code:
    ListMusic=http://mine-elite.fr/musique/listmusic.php
    //Set it to true if you want use URLs.txt
    useURLs.txt=false
    //set your money name
    moneyName=dollar
    //If you have lag add and set this line to false:
    onMove=true
    //Add and set to false to remove random music
    randomMusic=true
    //set to false if you don't want playing loop music on an NPC
    loopNpc=true
    //set to false if you don't want playing loop music in a region
    loopInRegion=true
    //set to false if you don't want see a message when the music is playing
    playMessage=true
    


    Support me:
    To help me and for give me the courage to make other big plugin you can donate or/and thank me for my job :D , you can also support Ryve ;)
    To donate:
    [​IMG]

    Support Ryve:
    Ryve is an independant musician and song writer, you listen to his music with this plugin (All music with the prefix M-E are the job of Ryve ) or go to this website:
    Ryve's Music (For french it's here)

    My favorite musics of ryve are (direct link to listen):
    Between sky and clouds (acoustic guitar)
    Strange Habit (close daft punk)
    Rise of factions (for metal)
    Its just in progress (acoustic guitar)
    Wind of time (electronic)


    To help him you have just to talk about him with your friend and family ;)

    Download:
    • RyveMusic V1.4.1 - Download (Source into the jar)
    • RyveMusic V1.4.1 for french (yeah i'm french) - Download
    Notice:
    • All my apologize for my english, forgive me I'm french :D
    • All music in the default file with prefix M-E are under our own license ( Licence Creative Commons ) so please ask to Ryve to use his music
    ChangeLog:
    v 1.4.1
    • Add setting playMessage to remove the message when a music is playing
    • Add reload command to reload setting file
    v 1.4
    • Ability to loop music
    • Add the command /rm playLoop
    • Add the possibility to set loop music on npc
    • Add the possibility to set loop music in region
    v 1.3
    • Fix few bugs
    • Give the possibility to have a simple txt file in RyveMusic folder to list music url (Set useURLs.txt to true in setting file and put url into URLs.txt in the same folder)
    v 1.2.2
    • Add the possibility to set event for start music
    • Add the possibility to remove random music
    v 1.2.1
    • Fix region parent and children (Need to set a parent for an imbricated region)
    v 1.2
    • Add music on npc
    v 1.1.2
    • Fix bugs like cast exception
    v 1.1

    • Add urldecode to parse an url
    • Retranslate some text
    • remove extension in the list of music
    Todo:
    • Give the possibility to have a simple txt file in RyveMusic folder to list music url
    • Put music on npc (It will be required to have citizens)
    • Play loop music into a region (need spout update) have i good idea to do that :D
    • Stop music on jukebox when you break it (need spout update)
    If you have problems, read that before asking:
    • trys to modify AuthenticateTicks in config.yml of spout and set it to 100
    • If you have a mac go to this topic to fix sound problem: here
    • Finally, see if you have set up the volume :)
    • I have get around spout for playing loop music so please don't annoying me if there are no bug with this.
    • Loop music only works with ogg and wav
     
    Noppoly likes this.
  2. Offline

    Olat

    @timoun

    Can you please make it so when a player uses a CD on a jukebox they lose the CD until they right click the Jukebox? Like it is for normal Jukebox CD's?
    Also if they take the CD out can you have it stop the music globally for every one.
     
  3. Offline

    Ritsbits

    Hi, when playing music I cannot hear it but my friend can. I am running Spoutcraft 1.02.165, Java 7 64 bit, friend is running Spoutcraft 1.02.165, Java 6 32 bit, if that helps.
     
  4. Offline

    ryanjjjj

    i have tested this plugin and it has worked however i have updated my spout to 1.0.2 as well as ryvesmusic to 1.4.1.
    i now get an error on initialization:
    08:13:56 [SEVERE] Error occurred while enabling RyveMusic v1.4.1 (Is it up to
    te?): 0
    java.lang.ArrayIndexOutOfBoundsException: 0
    at com.bukkit.arthurh.RyveMusic.Config.load(Config.java:90)
    at com.bukkit.arthurh.RyveMusic.RyveMusic.onEnable(RyveMusic.java:102
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoa
    .java:878)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginMan
    r.java:272)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:
    )
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    i am using bukkit 1060 and the spoutcraft client (i forget the version but its not relevant as the error is console)

    as i have said it worked at 1 point but after updateing it now goes wanky... i have included my config (without music url on purpose)

    EDIT: In game the /rm command also appears to be broken as any /rm command gives me the help text. i also noticed the french responses so i did some downloading and both links you have provided are for the french version of the plugin! let e know when the english version is for download
     

    Attached Files:

  5. Offline

    TehAndrewRyan

    Actually something that would be really interesting is if you can setup the loop function so that it continues from a certain time, instead of from the beginning. So the formal would be like MM:SS and perhaps even hundredths to make it really precise.
     
  6. Offline

    timoun

    @ryanjjjj
    You have an = in excess in your setting file and my plugin is by default in english if you the jar only

    @TehAndrewRyan
    sorry but i can't do that
     
  7. Offline

    ArchieSalt

    ive been trying for hours to get it to work but the settings.txt always reverts to default please help me :(
     
  8. Offline

    timoun

    after you have modify setting.txt perform the /rm reload when you are in game ;)
     
  9. Offline

    ArchieSalt

    thanks i did that and it works, but when i assign music to a region and wakl in it doesn't play
     
  10. Offline

    DeeLaYz

    Why not? :S
     
  11. Offline

    BioRage

    @timoun

    How do you make it so it auto-plays for the server, globally?
     
  12. Offline

    timoun

    @DeeLaYz
    i don't remember why i said that yesterday :)
    Finnaly, i will do it, be patient ;)

    @BioRage
    i don't understand what you asking me :S
     
  13. Offline

    BioRage

    If you put custom music in, there's 10 of them, how do you make it auto-play globally?

    As in you play all 10 randomly sequenced to everyone online (Not just the 2 null's globally)
     
  14. Offline

    ryanjjjj

     
  15. Offline

    Ritsbits

    Bump. I got overlooked?
     
  16. Offline

    PsychicDragonST

    Hi, I wanted to let you know that I've noticed music will not loop for songs uploaded through dropbox (or at least, my dropbox). I looked through your source code and I noticed that you use a php script on your website to get the duration of a song, but the duration always returns 0 for any dropbox link for whatever reason. For example, if I use the link http://www.vgmpf.com/Wiki/images/4/41/01_-_Sonic_the_Hedgehog_-_GEN_-_Title_Theme.ogg , then your php script correctly returns 9000 milliseconds ( http://mine-elite.fr/plugin/duratio..._-_Sonic_the_Hedgehog_-_GEN_-_Title_Theme.ogg ). However if I use a dropbox link to the same exact file, http://dl.dropbox.com/u/36728636/music/01_-_Sonic_the_Hedgehog_-_GEN_-_Title_Theme.ogg , then your php script incorrectly returns 0 ( http://mine-elite.fr/plugin/duratio..._-_Sonic_the_Hedgehog_-_GEN_-_Title_Theme.ogg ) and I believe this is why the music doesn't properly loop. Is there a way for this to be fixed so that dropbox links can be used?
     
  17. Offline

    nepal7

    Quand tu dis "Pour les français vous pouvez voir le topic sur minecraft.fr ici" ce serait plus correct de dire "pour les francophones" (je suis belge, je parle français mais je ne suis pas français).

    Cordialement.
     
  18. Offline

    RchGrav

    Great plugin.. I ditched all the other music plugins for this one.. I was really tired of editing configs for every song I wanted to add. Good design and well thought out.. I like the way you are using the PHP to dynamically populate the song list.

    Q: Are you planning on adding some error checking in the /RM command... Like catching non integers.

    Show Spoiler
    21:26:36 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'rm' in plugin RyveMusic v1.4.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:436)
    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.NumberFormatException: For input string: "tnt"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    at java.lang.Integer.parseInt(Integer.java:499)
    at com.bukkit.arthurh.RyveMusic.Commands.performRm(Commands.java:98)
    at com.bukkit.arthurh.RyveMusic.Commands.onCommand(Commands.java:40)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 13 more

    Call me Adrian Monk, but when players enter /rm play tnt instead of /rm play 24 and it dumps a stack trace on the console it drives me a little nuts.

    I feel kinda cheesy criticizing any plugin dev with my lack of java guru status... but I hope you don't take it personal. I have a bad habit of seeing 99.9% greatness and only mentioning the 0.1% which would make it perfect.. ask my GF... so many times on the couch. lol


    respect & regards,

    Rich
     
  19. Offline

    ryanjjjj

    i just noticed a bug with ryves 1.4.1, when i start up my server and shutdown the config seems to add an "=" to the config and break it for next start up. i came to you before with this and removing the "=" works but can you make it not break the plugin constantly lol thx
     
  20. Offline

    BioRage

    @timoun The musics take forever to download, and they end up not playing.

    do I have to name the music to something not like

    "The River of Stars - Ryan Hiryu"


    to

    theriverofstars-ryanhiryu
     
  21. Offline

    gait

    can you add page numbers like: /rm list (#) # can be a page number.
    i can't see all my songs :(

    and does anybody have a good site where i can play music of or where i can upload my music and then play it?
     
  22. Offline

    timoun

    @PsychicDragonST
    I think the url is too long try to remove dashed and underscore from the name of the song

    @nepal7
    sachant que francophone veut dire "parle habituellement la langue française" dois-je donc mettre pour ceux qui savent parle le français? -_-
    Bon en même temps tu n'as pas tort :)

    @BioRage
    yes you have to rename your song or encode your url with this http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

    @RchGrav
    You make me laught :)
    in fact, they are already thing to catch non integer that why you see null a the beginning but i forgot to stop the script :S

    @gait
    I didn't do that because with spout launcher you just have to scroll up the chat to see all your song :D
     
  23. Offline

    Ritsbits

    @timoun

    I can hear all other sounds, so I know it's not a case of sounds being muted. I can also hear default MC music. I supplied the above information as far as specs go...Some kind of help or thinking out loud to point me in the right direction to fix it would be great. I'm the one running the server, so I'm not sure if that matters or not. The song does show it downloading. All my other users can hear it but me.

    Your help would be much appreciated.
     
  24. Offline

    timoun

    If you have problems, read that before asking:

    • trys to modify AuthenticateTicks in config.yml of spout and set it to 100
    • If you have a mac go to this topic to fix sound problem: here
    • Finally, see if you have set up the volume :)
    • I have get around spout for playing loop music so please don't annoying me if there are no bug with this.
    • Loop music only works with ogg and wav
    tell me if you tried all this point.
     
  25. Offline

    TomCamavi

    Is there a way to loop music from a jukebox?
     
  26. Offline

    PsychicDragonST

    I have removed all dashes and underscores ( http://dl.dropbox.com/u/36728636/music/sonictitletheme.ogg ), but it doesn't really fix the no looping problem. Your 'get song duration' php script still returns 0 ( http://mine-elite.fr/plugin/duratio...pbox.com/u/36728636/music/sonictitletheme.ogg ). I don't think it was the name in general that was the problem, since the other link which had underscores and dashes correctly returned 9000, I think the problem is something specific with dropbox. For whatever reason, your php script doesn't want to play nice with dropbox.
     
  27. Offline

    Ritsbits

    Set ticks in config of spout to 100, restarted server, opened client, command "/rm play 24", downloads song, now playing song...sound is set to 50% and music is set to 5o%. I can hear all other game sounds/default MC music except the plugin's music. I don't have a mac so that doesn't apply. Win 7, Java 7 64bit. Music is your default plugin music under "/rm list". Still cannot hear the music playing but the other users can, including roommate. I just don't know what's not working and I try to figure it out before asking and I'm stumped. :eek:

    Thank you for the response.
     
  28. Offline

    gait

    thanks i didn't know that and i never tried!
     
  29. Offline

    Lotos

    Code:
    2011-08-25 02:24:29 [SEVERE] Could not pass event PLAYER_MOVE to RyveMusic
    java.lang.IllegalArgumentException: Cannot measure distance between worlds or to null
        at org.bukkit.Location.distance(Location.java:327)
        at com.bukkit.arthurh.RyveMusic.Npc.eventMove(Npc.java:84)
        at com.bukkit.arthurh.RyveMusic.RyveMusicPlayerListener.onPlayerMove(RyveMusicPlayerListener.java:194)
        at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:286)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:174)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:528)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        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:436)
        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)
    
    What's wrong with that ? I geting spammed by that.
     
  30. Offline

    Tauryuu

    @timoun Can you add an option to disable all messages that come up when you enter a region? It's pretty spammy if you keep switching regions.
     
  31. How about implementing playlists?
     

Share This Page