#786: Add methods to get sounds from entities

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot
2022-09-11 22:24:08 +10:00
parent 04574c48bb
commit 38ba2e3273
4 changed files with 120 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import org.bukkit.EntityEffect;
import org.bukkit.Location;
import org.bukkit.Nameable;
import org.bukkit.Server;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.block.PistonMoveReaction;
@ -447,6 +448,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@NotNull
public EntityType getType();
/**
* Get the {@link Sound} this entity makes while swimming.
*
* @return the swimming sound
*/
@NotNull
public Sound getSwimSound();
/**
* Get the {@link Sound} this entity makes when splashing in water. For most
* entities, this is just {@link Sound#ENTITY_GENERIC_SPLASH}.
*
* @return the splash sound
*/
@NotNull
public Sound getSwimSplashSound();
/**
* Get the {@link Sound} this entity makes when splashing in water at high
* speeds. For most entities, this is just {@link Sound#ENTITY_GENERIC_SPLASH}.
*
* @return the splash sound
*/
@NotNull
public Sound getSwimHighSpeedSplashSound();
/**
* Returns whether this entity is inside a vehicle.
*