org.bukkit.entity.Entity.isOnGround()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.bukkit.entity.Entity.isOnGround()方法的一些代码示例,展示了Entity.isOnGround()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.isOnGround()方法的具体详情如下:
包路径:org.bukkit.entity.Entity
类名称:Entity
方法名:isOnGround

Entity.isOnGround介绍

[英]Returns true if the entity is supported by a block. This value is a state updated by the server and is not recalculated unless the entity moves.
[中]如果实体受块支持,则返回true。此值是服务器更新的状态,除非实体移动,否则不会重新计算。

代码示例

代码示例来源:origin: bergerkiller/BKCommonLib

@Override
public boolean isOnGround() {
  return base.isOnGround();
}

代码示例来源:origin: EngineHub/CommandHelper

@Override
public boolean isOnGround() {
  return e.isOnGround();
}

代码示例来源:origin: elBukkit/MagicPlugin

@Override
public boolean isJumping() {
  Entity entity = getEntity();
  return (entity != null && !entity.isOnGround());
}

代码示例来源:origin: elBukkit/MagicPlugin

@EventHandler
public void onPlayerToggleGlide(EntityToggleGlideEvent event)
{
  Entity entity = event.getEntity();
  Mage mage = controller.getRegisteredMage(entity);
  if (mage != null && mage.isGlidingAllowed() && !event.isGliding() && !entity.isOnGround()) {
    event.setCancelled(true);
    Player player = mage.getPlayer();
    if (player != null) {
      controller.addFlightExemption(player, 5000);
    }
  }
}

代码示例来源:origin: ProjectKorra/ProjectKorra

if (this.entity.isOnGround()) {
  this.remove();
  return;

代码示例来源:origin: libraryaddict/LibsDisguises

if (isVelocitySent() && vectorY != null && (alwaysSendVelocity || !getEntity().isOnGround())) {
  Vector vector = getEntity().getVelocity();
      !(vector.getY() < 0 && alwaysSendVelocity && getEntity().isOnGround())) {
    return;
  if (getType() != DisguiseType.EXPERIENCE_ORB || !getEntity().isOnGround()) {
    PacketContainer lookPacket = null;

相关文章