枚举的使用
org.bukkit.SoundCategory
-
org.bukkit中SoundCategory的使用
修饰符和类型方法说明static SoundCategory
返回带有指定名称的该类型的枚举常量。static SoundCategory[]
SoundCategory.values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。修饰符和类型方法说明void
World.playSound
(Location location, String sound, SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World.void
World.playSound
(Location location, Sound sound, SoundCategory category, float volume, float pitch) Play a Sound at the provided Location in the World. -
org.bukkit.entity中SoundCategory的使用
修饰符和类型方法说明void
Player.playSound
(Location location, String sound, SoundCategory category, float volume, float pitch) Play a sound for a player at the location.void
Player.playSound
(Location location, Sound sound, SoundCategory category, float volume, float pitch) Play a sound for a player at the location.void
Player.stopSound
(String sound, SoundCategory category) Stop the specified sound from playing.void
Player.stopSound
(Sound sound, SoundCategory category) Stop the specified sound from playing.