本文整理汇总了Java中org.bukkit.entity.Player.getEntityId方法的典型用法代码示例。如果您正苦于以下问题:Java Player.getEntityId方法的具体用法?Java Player.getEntityId怎么用?Java Player.getEntityId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.entity.Player
的用法示例。
在下文中一共展示了Player.getEntityId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPotionEffect
import org.bukkit.entity.Player; //导入方法依赖的package包/类
public static void addPotionEffect(Player p, PotionEffect pe) {
Packet41MobEffect pm = new Packet41MobEffect();
pm.a = p.getEntityId();
pm.b = (byte)pe.getType().getId();
pm.c = (byte)pe.getAmplifier();
pm.d = (short)pe.getDuration();
((CraftPlayer) p).getHandle().playerConnection.sendPacket(pm);
pm = null;
}
示例2: removePotionEffect
import org.bukkit.entity.Player; //导入方法依赖的package包/类
public static void removePotionEffect(Player p, PotionEffectType pe) {
Packet42RemoveMobEffect pm = new Packet42RemoveMobEffect();
pm.a = p.getEntityId();
pm.b = (byte) pe.getId();
((CraftPlayer) p).getHandle().playerConnection.sendPacket(pm);
pm = null;
}
示例3: removePotionEffect
import org.bukkit.entity.Player; //导入方法依赖的package包/类
public void removePotionEffect(PotionEffectType effect) {
getPlayer().removePotionEffect(effect);
Player p = getPlayer();
Packet42RemoveMobEffect pm = new Packet42RemoveMobEffect();
pm.a = p.getEntityId();
pm.b = (byte) effect.getId();
((CraftPlayer) p).getHandle().playerConnection.sendPacket(pm);
pm = null;
}