Vouchers+
  • 👋Welcome to Vouchers+
  • Overview
    • 💡What is Vouchers+?
    • ✨Our Features
    • ⭐Our Reviews
  • Fundamentals
    • 📜General Information
      • Permission Nodes
      • Commands
    • 🛠️Setting Up
      • Config.yml
        • General Configuration
        • Voucher Configuration
      • Messages.yml
        • General Plugin Messages
        • Voucher Action Messages
    • 🎫Creating a Voucher
      • Primary Details
      • Effects Details
      • Adding Rewards
      • 🔍Example Vouchers
  • Advanced
    • ✍️Using /vouchers edit
    • 📘PAPI Placeholders
  • Additional Information
    • 🔊Sounds
    • ✨Particles
    • 🎆Effects
  • FAQ
    • 📃FAQ
Powered by GitBook
On this page
  • Validation
  • SoundID
  • Volume
  • Pitch
  • Example Configuration Extract

Was this helpful?

  1. Additional Information

Sounds

A descriptive overview of the Voucher sound effects within Vouchers+

Last updated 1 year ago

Was this helpful?

Vouchers+ allows you to include a sound effect that is run every time a voucher is redeemed. This is under the Sound configuration area of the YML file.

There are three primary settings that are included within the sound option. These are below:

  • SoundID: This is the minecraft Enum value of the sound to be played. This may be set to 'none' to prevent any sound from being played.

  • Volume: This is the volume of the sound to be played.

  • Pitch: This is the pitch of the sound to be played.

It is worth noting that all sounds are played through the master channel, this can not be adjusted.

Validation

There are a couple of validation rules applied internally, these apply to the three primary configuration areas surrounding the sound setting.

SoundID

The SoundID must be a valid minecraft sound Enum in order for a sound to play. A list of valid sound Enum's can be found here:

Some data manipulation is applied to allow for different standards of writing. For example, let us consider the sound Enum This may be written as block_anvil_hit, or block.anvil.hit The plugin will automatically manipulate the data to the standard format of writing. That being said, this will not apply to all scenarios, and thus it is recommended that you enter the sound Enum exactly as found within the list.

Volume

The Volume value must be a valid decimal-integer (number) that is greater than or equal to 0.0. If a value less than 0 is given, the plugin will default to the value 1.0.

Pitch

The Pitch value must be a valid decimal-integer (number) that is greater than or equal to 0.0, and less than or equal to 2.0. If a value outside of this permitted region is given, the plugin will default to the value 1.0.

Example Configuration Extract

# The minecraft sound ID and data to be played upon pouch redeem. 
# Don't add this section if you don't need it.
Sound:
  SoundID: 'ENTITY_PLAYER_LEVELUP'
  Volume: 1
  Pitch: 1

An example configuration extract for the sound with Enum , with volume 1 and pitch 1 has been included below:

🔊
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
BLOCK_ANVIL_HIT
ENTITY_PLAYER_LEVELUP