Skip to content

Mvndi/TownySounds

Repository files navigation

TownySounds

A lightweight plugin that lets you configure custom sounds for Towny events.

Features

  • Play different Minecraft sounds when Towny events occur.
  • Fully configurable per event via config.yml.
  • Supports volume and pitch control.

🔧 Command

/townysounds reload — Reloads the plugin configuration.
Requires the townysounds.reload permission.

⚙️ Example Configuration

sound is one the same sounds that autocomplete in the /playsound command

the event key (eg NewDayEvent) is a Towny event, these can be found in the javadocs such as

Main Events

Town Events

Nation Events

the path is methods available in the event also available on the javadoc, the path is passed into the notifier. available notifiers are nation, town, and everyone

the sound can be set to none to not play, or the volume can be set to 0, or it can just be removed for the config

events:
  NewDayEvent:
    sound: minecraft:entity.player.levelup
    category: UI
    volume: 1.0
    pitch: 1.0
    notifier: everyone
  NationKingChangeEvent:
    sound: minecraft:entity.player.levelup
    category: UI
    volume: 1.0
    pitch: 1.0
    notifier: nation
    path: getNation
  NationInviteTownEvent:
    sound: minecraft:entity.player.levelup
    category: UI
    volume: 1.0
    pitch: 1.0
    notifier: nation
    path: getInvite.getSender
  TownAddResidentEvent:
    sound: minecraft:entity.player.levelup
    category: UI
    volume: 1.0
    pitch: 1.0
    notifier: town
    path: getTown

you can also put the full event name if you know it such as com.palmergames.bukkit.towny.event.nation.NationPreAddAllyEvent but the yaml key must have the . characters replaced with $ characters like

  com$palmergames$bukkit$towny$event$nation$NationPreAddAllyEvent:
    sound: minecraft:entity.player.levelup
    category: UI
    volume: 1.0
    pitch: 1.0
    notifier: nation
    path: getNation

if just the class name is added TownySounds will try the 3 common prefixes of com.palmergames.bukkit.towny.event., com.palmergames.bukkit.towny.event.nation., and com.palmergames.bukkit.towny.event.town.

all sounds currently playing for the player with the same category as the sound about to be played are stopped before the sound is played

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages