Player Repository

The Core file of the plugin!

How to create melody player

There are two options how to create melody player. By in-game Reward UI or Manually in the confiuration file. Both have some restrictions, so if you want use some advanced methods you will need to use combination of them.

Using in-game UI

To open UI type /MelodyPlayer Settings

Manually in the file

Configuration file PlayerRepository.yml is located at main folder of MelodyPlayer plugin.

Template for the one melody player

MELODY_PLAYER_1:
  Author: e2c593d6-f250-4e63-a26e-417650d0e77a
  Name:
   EN: Music Player
  Description:
    EN: Description
  Icon:
    CustomModelData: 0
    Enchantment: false
    Material: GREEN_RECORD
    MaterialData: 0
    Color: 255:255:255
    ItemFlagList:
    - HIDE_ENCHANTS
    - HIDE_ATTRIBUTES
    - HIDE_POTION_EFFECTS
  Active: false
  Melodies:
  - Animals
  - The Legend of Zelda Theme
  - What is Love
  Volume: 100
  Range: 10
  Level: LOCATION

Explanation of variables

Name and Description support multi-localization

Name:
  EN: "Melody Player #1"
  SK: "Prehrávač #1"

Volume

Set the volume level for how loudly the songs are played."

Range

Determine the distance from the SpawnPoint within which music can be heard.

Melody

List of melodies assigned to this melody player.

Recommended to setup via in-game UI.

Level

Specify the locations where music will be played.

Allowed values:

  • LOCATION - Around specific location in defined range.

  • WORLD - Around whole world where the location is placed. - Only one per world can be active!

  • SERVER - In all worlds on the server. - Only one melody player per server can be active!

Activity

Once the melody player has defined all required variables, it's ready to play mucis.

Finally

After successful setting up of the melody players, you need to reload the plugin/player to load new melody palyers.

To reload the melody player type /MelodyPlayer Reload Player <MelodyPlayer>

Last updated