From f714a0eb175d1619a7847946cdea1056649cd597 Mon Sep 17 00:00:00 2001 From: Lukas Hennig Date: Wed, 2 Mar 2016 14:02:18 +0100 Subject: Added a playSound method to World which accepts a String parameter. Similar to the respective method in Player. --- src/main/java/org/bukkit/World.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 5cc1feca..58f44313 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1120,6 +1120,20 @@ public interface World extends PluginMessageRecipient, Metadatable { */ void playSound(Location location, Sound sound, float volume, float pitch); + /** + * Play a Sound at the provided Location in the World. + *

+ * This function will fail silently if Location or Sound are null. No + * sound will be heard by the players if their clients do not have the + * respective sound for the value passed. + * + * @param location the location to play the sound + * @param sound the internal sound name to play + * @param volume the volume of the sound + * @param pitch the pitch of the sound + */ + void playSound(Location location, String sound, float volume, float pitch); + /** * Get existing rules * -- cgit v1.2.3