📜  spigot 声音 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:23.713000             🧑  作者: Mango

代码示例1
// volume 0.0-1.0 (more than 1 = players from far away can hear it)
// pitch = playback speed (1 is normal)
//player.playSound(location, sound, volume, pitch)
player.playSound(location, Sound.*****, 1.0F, 1.0F);    // Plays sound only for this player  
Bukkit.getWorld("world").playSound(location, sound, volume, pitch); // Plays sound for all players around sound source