Developer Information: ServerSide

Developer Information: Server Side

-

Create your own loop: Server Side

Creating the loop on the server's side is actually quite easy. The way MusicLoop gets the names of songs and the time the song is played is all stored in one .txt file. Inside the Datafolder in the plugins folder there is a folder called Music (BukkitFolder/plugins/Music/Music). This folder stores all the .txt files for each loop. To create a loop you need the following:

The way MusicLoop gets the name of the sound is it reads the name of the file (E.G. SoundName.txt) [The name is Case Sensitive], and the way it gets how long that sound should play before playing it again is controlled by the first line of the file. The time is stored in quater seconds, so if you want a sound to play for one second before looping, you would put '4'. If you want to have it loop every 5 seconds, you would put '20' [Note] Do not add the '....[The first line can not be blank. If it is the sound will not load. Also it must be a number. The sound will not load if the line has any other symbols.You can have as many other lines as you want, as they will not effect the load process.]

If you are unsure how the .txt file or the /Music files should look, you can look at the examples provided in the zip file.

If you have correctly created the .txt file, the song should load. To test this, run the server and look for a log for MusicLoop (titled [Music]). In one of the lines printed, there should be the name of your sound and the amount of time there will be before it plays again. If you do not see the name of your sound, then it has not been loaded because it did not see your .txt file. If there is an error message that is printed out in, there is most likely a problem with the name of the song, the type of tile format not being a text file, or that there is some other symbol in the first line of the .txt file.

Adding the Resourcepack : Server Side

Adding the resourcepack is also quite easy as well. To add the resourcepack, you must go to the plugins datafolder to a file called "Resourcepacks.txt" (BukkitFolder/plusings/Music/Resourcepacks.txt). Inside this file, there should be already 3 lines that read:

DEFAULT dev.bukkit.org/media/files/880/400/Music_-_HowThisWorks.zip [&&END&&]

Let me go over what each line means.

  • The first line "DEFAULT" is the name of the resourcepack. This should always be on an odd number of lines. (1,3,5,7)
  • The line with the link is the link directly to the page where the resourcepack is. In this example, this is the direct link to the file itself. These must be on even number lines (2,4,6,8)
  • The last line is [&&END&&]. This does not really mean anything besides that this is the last line and that there are no other resourcepacks.
    • Note that there are no spaces/empty lines

Now, to add the resourcepack you must go above the [&&END&&] line and put down two more lines. The first line should be the name of the new resourcepack and the link to the resourcepack. It should now look like so:

DEFAULT dev.bukkit.org/media/files/880/400/Music_-_HowThisWorks.zip MYRESOURCEPACK my.resourcepack.link [&&END&&]

The way to test to see if the resourcepack is loaded is to go onto the server and type /loop get .If you see your resourcepack at the bottom of the list, you have correctly added your resourcepack. If you do not see your resourcepack, a common mistake is that you put the link below the [&&END&&] line.


Comments

Posts Quoted:
Reply
Clear All Quotes