# 枚举的使用
org.bukkit.SoundCategory

使用SoundCategory的程序包
程序包
说明
org.bukkit
Bukkit API的顶级程序包, 包含通用的API类和接口.
org.bukkit.entity
为在`世界`内存在的非三维像素单位(实体)提供的接口，包含玩家、怪物、抛射物等.

- ## org.bukkit中SoundCategory的使用

  返回SoundCategory的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `static SoundCategory`
  SoundCategory.`valueOf(String name)`
  返回带有指定名称的该类型的枚举常量。
  `static SoundCategory[]`
  SoundCategory.`values()`
  按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
  参数类型为SoundCategory的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `void`
  World.`playSound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a Sound at the location of the provided entity in the World.
  `void`
  World.`playSound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a Sound at the location of the provided entity in the World.
  `void`
  World.`playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a Sound at the location of the provided entity in the World.
  `void`
  World.`playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a Sound at the location of the provided entity in the World.
  `void`
  World.`playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a Sound at the provided Location in the World.
  `void`
  World.`playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a Sound at the provided Location in the World.
  `void`
  World.`playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a Sound at the provided Location in the World.
  `void`
  World.`playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a Sound at the provided Location in the World.

- ## org.bukkit.entity中SoundCategory的使用

  参数类型为SoundCategory的org.bukkit.entity中的方法
  修饰符和类型
  方法
  说明
  `void`
  Player.`playSound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a sound for a player at the location of the entity.
  `void`
  Player.`playSound(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a sound for a player at the location of the entity.
  `void`
  Player.`playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)`
  Play a sound for a player at the location of the entity.
  `void`
  Player.`playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a sound for a player at the location of the entity.
  `void`
  Player.`playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch)`
  向玩家在指定位置播放声音.
  `void`
  Player.`playSound(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a sound for a player at the location.
  `void`
  Player.`playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch)`
  向玩家在指定位置播放声音.
  `void`
  Player.`playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed)`
  Play a sound for a player at the location.
  `void`
  Player.`stopSound(@NotNull String sound, @Nullable SoundCategory category)`
  停止播放指定的声音.
  `void`
  Player.`stopSound(@NotNull SoundCategory category)`
  Stop the specified sound category from playing.
  `void`
  Player.`stopSound(@NotNull Sound sound, @Nullable SoundCategory category)`
  停止播放指定的声音.