本文整理汇总了Java中org.bukkit.craftbukkit.CraftSound.getSound方法的典型用法代码示例。如果您正苦于以下问题:Java CraftSound.getSound方法的具体用法?Java CraftSound.getSound怎么用?Java CraftSound.getSound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.craftbukkit.CraftSound
的用法示例。
在下文中一共展示了CraftSound.getSound方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: playSound
import org.bukkit.craftbukkit.CraftSound; //导入方法依赖的package包/类
public void playSound(Location loc, Sound sound, float volume, float pitch) {
if (loc == null || sound == null || getHandle().playerConnection == null) return;
double x = loc.getBlockX() + 0.5;
double y = loc.getBlockY() + 0.5;
double z = loc.getBlockZ() + 0.5;
Packet62NamedSoundEffect packet = new Packet62NamedSoundEffect(CraftSound.getSound(sound), x, y, z, volume, pitch);
getHandle().playerConnection.sendPacket(packet);
}
示例2: playSound
import org.bukkit.craftbukkit.CraftSound; //导入方法依赖的package包/类
public void playSound(Location loc, Sound sound, float volume, float pitch) {
if (loc == null || sound == null || getHandle().field_71135_a == null) return;
double x = loc.getBlockX() + 0.5;
double y = loc.getBlockY() + 0.5;
double z = loc.getBlockZ() + 0.5;
net.minecraft.network.packet.Packet62LevelSound packet = new net.minecraft.network.packet.Packet62LevelSound(CraftSound.getSound(sound), x, y, z, volume, pitch);
getHandle().field_71135_a.func_72567_b(packet);
}
示例3: getKey
import org.bukkit.craftbukkit.CraftSound; //导入方法依赖的package包/类
public static String getKey(Sound bukkitSound) {
return CraftSound.getSound(bukkitSound);
}