mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-12 10:45:50 -07:00
@@ -2014,7 +2014,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|||||||
void setAmbientSpawnLimit(int limit);
|
void setAmbientSpawnLimit(int limit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Play a Sound at the provided Location in the World
|
* Play a Sound at the provided Location in the World.
|
||||||
* <p>
|
* <p>
|
||||||
* This function will fail silently if Location or Sound are null.
|
* This function will fail silently if Location or Sound are null.
|
||||||
*
|
*
|
||||||
@@ -2067,6 +2067,31 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
|||||||
*/
|
*/
|
||||||
void playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch);
|
void playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play a Sound at the location of the provided entity in the World.
|
||||||
|
* <p>
|
||||||
|
* This function will fail silently if Entity or Sound are null.
|
||||||
|
*
|
||||||
|
* @param entity The entity to play the sound
|
||||||
|
* @param sound The sound to play
|
||||||
|
* @param volume The volume of the sound
|
||||||
|
* @param pitch The pitch of the sound
|
||||||
|
*/
|
||||||
|
void playSound(@NotNull Entity entity, @NotNull Sound sound, float volume, float pitch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play a Sound at the location of the provided entity in the World.
|
||||||
|
* <p>
|
||||||
|
* This function will fail silently if Entity or Sound are null.
|
||||||
|
*
|
||||||
|
* @param entity The entity 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
|
||||||
|
*/
|
||||||
|
void playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an array containing the names of all the {@link GameRule}s.
|
* Get an array containing the names of all the {@link GameRule}s.
|
||||||
*
|
*
|
||||||
|
@@ -349,6 +349,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||||||
*/
|
*/
|
||||||
public void playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch);
|
public void playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play a sound for a player at the location of the entity.
|
||||||
|
* <p>
|
||||||
|
* This function will fail silently if Entity or Sound are null.
|
||||||
|
*
|
||||||
|
* @param entity The entity to play the sound
|
||||||
|
* @param sound The sound to play
|
||||||
|
* @param volume The volume of the sound
|
||||||
|
* @param pitch The pitch of the sound
|
||||||
|
*/
|
||||||
|
public void playSound(@NotNull Entity entity, @NotNull Sound sound, float volume, float pitch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play a sound for a player at the location of the entity.
|
||||||
|
* <p>
|
||||||
|
* This function will fail silently if Entity or Sound are null.
|
||||||
|
*
|
||||||
|
* @param entity The entity 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(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the specified sound from playing.
|
* Stop the specified sound from playing.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user