Filled NBS Looper

Discussion in 'Plugin Requests' started by UnseenMC, Dec 13, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    UnseenMC

    Plugin category: Fun

    Minecraft version: 1.8.8 :D

    Suggested name: NBSChristmasLooper

    What I want: I need a plugin where basically I put any NBS songs I want into the plugin folder and when a player joins the server, the music starts playing. If they run /musicstop, it stops the music. Whenever the player rejoins, it starts the music again. (Kinda like this plugin but I want to be able to add some more songs to it).

    Ideas for commands:
    /stopm - None
    /stopmusic - None
    /christmasmusic reload - unseenmc.reloadmusic

    Ideas for permissions: unseenmc.reloadmusic

    When I'd like it by: 4-5 days. :)
     
  2. Offline

    JRL1004

    Looking at the code, it should be possible to use any songs you want in the plugin you provided the link for, the only downside is that you are limited to five songs named "1.nbs", "2.nbs" ... "5.nbs"

    The plugin you linked (JinGamerZ's ChristmasMusic) looks like it could very easily support more audio files, but chooses not to (as the developer hardcoded it to 5 files instead of simply getting the file list of his song folder).
    I could modify this to support any nbs songs that you put into the folder, but I would feel bad as most of this work is not mine. (Also, I feel like the community would frown on me for changing only the onEnable and reposting the plugin).

    If any devs want to make this, feel free, other wise I could just tweak JinGamerZ's code to match OP's need.
     
  3. Offline

    UnseenMC

    Are you able to do this? That would be amazing.
     
  4. Offline

    JRL1004

    @UnseenMC I was working on this for a while and I learned a number of things such as that notes have been mas renamed in 1.10.2 (making this plugin fail above 1.8), and that I should test plugins before attempting to modify them.
    After coming to this second realization, I found that you can just change the plugin's config.yml to have all of the file names for the songs that you want and just put the nbs files in the Muzica folder. Overall, I didn't have to do anything and I feel fairly ridiculous. The original plugin will work for you, just tweak the config.yml to have your song names.
     
  5. Offline

    UnseenMC

    Can you give me an example on how I can tweak my config?
     
  6. Offline

    JRL1004

    @UnseenMC The config is just a list of strings that you can add to or remove from
    Code:
    Music:
    - '[Song 1]'
    - '[Song 2]'
    - '[Song 3]'
    - '[Song 4]'
    - '[Song 5]'
    - '[Song 6]'
    and so on. Leave the .nbs out of the name, and it is case sensitive
     
  7. Offline

    UnseenMC

    Solved! :D
     
Thread Status:
Not open for further replies.

Share This Page