summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/entity/Player.java
diff options
context:
space:
mode:
authorLukBukkit <luk.bukkit@gmail.com>2016-11-19 14:19:53 +1100
committermd_5 <git@md-5.net>2016-11-19 14:19:53 +1100
commit7512561bdb4c8f8f95d3dc4e5f58370437adff7f (patch)
treef3aefd6393f27067812204168082d6aa6dad9660 /src/main/java/org/bukkit/entity/Player.java
parent6c22b7154d62d5db3dc72132de1d966ca4d5a6b0 (diff)
downloadbukkit-7512561bdb4c8f8f95d3dc4e5f58370437adff7f.tar
bukkit-7512561bdb4c8f8f95d3dc4e5f58370437adff7f.tar.gz
bukkit-7512561bdb4c8f8f95d3dc4e5f58370437adff7f.tar.lz
bukkit-7512561bdb4c8f8f95d3dc4e5f58370437adff7f.tar.xz
bukkit-7512561bdb4c8f8f95d3dc4e5f58370437adff7f.zip
Implement SoundCategory for playing sounds.
Diffstat (limited to 'src/main/java/org/bukkit/entity/Player.java')
-rw-r--r--src/main/java/org/bukkit/entity/Player.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 73816a05..d3210229 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -13,6 +13,7 @@ import org.bukkit.Note;
import org.bukkit.OfflinePlayer;
import org.bukkit.Particle;
import org.bukkit.Sound;
+import org.bukkit.SoundCategory;
import org.bukkit.Statistic;
import org.bukkit.WeatherType;
import org.bukkit.command.CommandSender;
@@ -242,6 +243,34 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
public void playSound(Location location, String sound, float volume, float pitch);
/**
+ * Play a sound for a player at the location.
+ * <p>
+ * This function will fail silently if Location or Sound are null.
+ *
+ * @param location The location to play the sound
+ * @param sound The sound to play
+ * @param category The category of the sound
+ * @param volume The volume of the sound
+ * @param pitch The pitch of the sound
+ */
+ public void playSound(Location location, Sound sound, SoundCategory category, float volume, float pitch);
+
+ /**
+ * Play a sound for a player at the location.
+ * <p>
+ * This function will fail silently if Location or Sound are null. No sound
+ * will be heard by the player if their client does 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 category The category of the sound
+ * @param volume the volume of the sound
+ * @param pitch the pitch of the sound
+ */
+ public void playSound(Location location, String sound, SoundCategory category, float volume, float pitch);
+
+ /**
* Stop the specified sound from playing.
*
* @param sound the sound to stop