added playSound methods to the World interface and a utility method to Location

By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
Bukkit/Spigot
2011-06-09 12:32:55 -07:00
parent b91a8f0389
commit e8e27a86f4
3 changed files with 66 additions and 1 deletions

View File

@ -523,7 +523,32 @@ public interface World {
* @return List containing any or none BlockPopulators
*/
public List<BlockPopulator> getPopulators();
/**
* Plays a sound to just one player.
* @param player the player to play the sound for
* @param sound the {@link Sound}
* @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds
*/
public void playSound(Player player, Sound sound, int data);
/**
* Plays a sound to all players within a default radius around a given location.
* @param location the {@link Location} around which players must be to hear the sound
* @param sound the {@link Sound}
* @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds
*/
public void playSound(Location location, Sound sound, int data);
/**
* Plays a sound to all players within a given radius around a location.
* @param location the {@link Location} around which players must be to hear the sound
* @param sound the {@link Sound}
* @param data a data bit needed for the RECORD_PLAY, SMOKE, and STEP_SOUND sounds
* @param radius the radius around the location
*/
public void playSound(Location location, Sound sound, int data, int radius);
/**
* Represents various map environment types that a world may be
*/