Skip to content

Commit

Permalink
Add <server.list_sounds> (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicScore authored and mcmonkey4eva committed Jun 14, 2018
1 parent 1d36ce4 commit b310127
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -223,6 +223,20 @@ public void serverTag(ReplaceableTagEvent event) {
event.setReplaced(enchants.getAttribute(attribute.fulfill(1)));
}

// <--[tag]
// @attribute <server.list_sounds>
// @returns dList
// @description
// Returns a list of all sounds known to the server (only their Bukkit enum names).
// -->
if (attribute.startsWith("list_sounds")) {
dList sounds = new dList();
for (Sound s : Sound.values()) {
sounds.add(s.toString());
}
event.setReplaced(sounds.getAttribute(attribute.fulfill(1)));
}

// <--[tag]
// @attribute <server.list_flags[(regex:)<search>]>
// @returns dList
Expand Down

0 comments on commit b310127

Please sign in to comment.