ArrowBodyCountChangeEvent
ArrowBodyCountChangeEvent
=> org.bukkit.event.Event
=> org.bukkit.event.entity.EntityEvent
=> org.bukkit.event.entity.ArrowBodyCountChangeEvent
Called when an arrow enters or exists an entity's body.当一根箭矢射入某个实体体内或从体内被拔出时触发。译注:原文所谓“exists”,不知所云,应当为“exits”之衍文。即“箭矢自体内被拔出”。本事件可能在两种情况下触发。其一为net.minecraft.server.v1_16_R3.EntityPlayer#reset()
方法。该方法会将玩家体内箭矢数量设为零 。其二为箭矢击 中生物,此时生物体内的箭矢数量会增加一。
方法声明: public boolean isReset()
方法签名: ()Z
Whether the event was called because the entity was reset.@return was reset该方法用于获取本事件是否是由于实体被重置而触发。@return 本事件是否是由于实体被重置而触发。译注:即net.minecraft.server.v1_16_R3.EntityPlayer#reset()
方法的情况。
方法声明: public int getOldAmount()
方法签名: ()I
Gets the old amount of arrows in the entity's body.@return amount of arrows该方法用于获取事件发生前实体体内原有的箭矢数量。@return 原有的箭矢数量。
方法声明: public int getNewAmount()
方法签名: ()I
Get the new amount of arrows in the entity's body.@return amount of arrows该方法用于获取事件发生后实体体内将会存在的箭矢数量。@return 新的箭矢数量。
方法声明: public void setNewAmount(int newAmount)
方法签名: (I)V
Sets the final amount of arrows in the entity's body.@param newAmount amount of arrows该方法用于设置事件发生后实体体内将会存在的箭矢数量。@param newAmount 新的箭矢数量。
方法声明: public LivingEntity getEntity()
方法签名: ()Lorg/bukkit/entity/LivingEntity;
译注:无文档。该方法用于获取涉事生物。
方法声明: 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