类 ExpBottleEvent

所有已实现的接口:
Cancellable

public class ExpBottleEvent extends ProjectileHitEvent
当投掷的经验瓶命中并释放经验时调用。
  • 构造器详细资料

  • 方法详细资料

    • getEntity

      @NotNull public @NotNull ThrownExpBottle getEntity()
      从类复制的说明: EntityEvent
      返回这个事件所涉及的实体.

      原文: Returns the Entity involved in this event

      覆盖:
      getEntity 在类中 ProjectileHitEvent
      返回:
      涉及这个事件的实体
    • getShowEffect

      public boolean getShowEffect()
      此方法指示是否应显示粒子效果。

      原文: This method indicates if the particle effect should be shown.

      返回:
      如果显示效果则返回 true,否则返回 false
    • setShowEffect

      public void setShowEffect(boolean showEffect)
      此方法设置是否显示粒子效果。

      这不会改变产生的经验。

      原文: This method sets if the particle effect will be shown.

      This does not change the experience created.

      参数:
      showEffect - true 表示显示效果,false 表示不显示效果
    • getExperience

      public int getExperience()
      此方法检索将要产生的经验量。

      该数字表示要分成多个经验球的总量。

      原文: This method retrieves the amount of experience to be created.

      The number indicates a total amount to be divided into orbs.

      返回:
      将要产生的经验总量
    • setExperience

      public void setExperience(int exp)
      此方法设置将要产生的经验量。

      该数字表示要分成多个经验球的总量。

      原文: This method sets the amount of experience to be created.

      The number indicates a total amount to be divided into orbs.

      参数:
      exp - 将要产生的经验总量
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      覆盖:
      getHandlers 在类中 ProjectileHitEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()