VehicleDamageEvent
VehicleDamageEvent
=> org.bukkit.event.Event
=> org.bukkit.event.vehicle.VehicleEvent
=> org.bukkit.event.vehicle.VehicleDamageEvent
Raised when a vehicle receives damage.当载具受到伤害时触发。
方法声明: public Entity getAttacker()
方法签名: ()Lorg/bukkit/entity/Entity;
Gets the Entity that is attacking the vehicle@return the Entity that is attacking the vehicle该方法用于获取攻击载具的实体。@return 攻击载具的实体。译注:可能返回null
,因为载具也可能受到岩浆等形式的伤害。这种情况下不存在攻击载具的实体。
方法声明: public double getDamage()
方法签名: ()D
Gets the damage done to the vehicle@return the damage done to the vehicle该方法用于获取载具受到的伤害量。@return 载具受到的伤害量。
方法声明: public void setDamage(double damage)
方法签名: (D)V
Sets the damage done to the vehicle@param damage The damage该方法用于设置载具受到的伤害量。@param damage 伤害量。
方法声明: public boolean isCancelled()
方法签名: ()Z
方法声明: public void setCancelled(boolean cancel)
方法签名: (Z)V
方法声明: public HandlerList getHandlers()
方法签名: ()Lorg/bukkit/event/HandlerList;
方法声明: public static HandlerList getHandlerList()
方法签名: ()Lorg/bukkit/event/HandlerList;
Last modified 1mo ago