本文整理了Java中org.bukkit.entity.Entity.leaveVehicle()
方法的一些代码示例,展示了Entity.leaveVehicle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.leaveVehicle()
方法的具体详情如下:
包路径:org.bukkit.entity.Entity
类名称:Entity
方法名:leaveVehicle
[英]Leave the current vehicle. If the entity is currently in a vehicle (and is removed from it), true will be returned, otherwise false will be returned.
[中]离开当前车辆。如果实体当前在车辆中(并且已从车辆中移除),则将返回true,否则将返回false。
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public boolean leaveVehicle() {
return base.leaveVehicle();
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public boolean leaveVehicle() {
return e.leaveVehicle();
}
代码示例来源:origin: bergerkiller/BKCommonLib
public boolean leaveVehicle() {
return entity.leaveVehicle();
}
代码示例来源:origin: NyaaCat/RPGItems-reloaded
@Override
public void run() {
if (ticks >= maxTicks || player.getPassengers().isEmpty() || entity.isDead()) {
cancel();
if (finalListener != null) {
HandlerList.unregisterAll(finalListener);
}
if (!player.getPassengers().isEmpty() && player.getPassengers().get(0).getUniqueId().equals(entity.getUniqueId())) {
player.getPassengers().get(0).leaveVehicle();
}
}
ticks++;
}
}.runTaskTimer(RPGItems.plugin, 1, 1);
代码示例来源:origin: NyaaCat/RPGItems-reloaded
if (!player.getPassengers().isEmpty()) {
Entity entity = player.getPassengers().get(0);
entity.leaveVehicle();
if (throwSpeed > 0.0D) {
player.getWorld().playSound(player.getLocation(), Sound.ENTITY_EGG_THROW, 1.0F, 1.0F);
内容来源于网络,如有侵权,请联系作者删除!