类 StatAwardEvent

所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent

public class StatAwardEvent extends PlayerEvent implements net.neoforged.bus.api.ICancellableEvent
Fired when a Player is awarded a Stat. This event is fired in Player.awardStat(Stat, int)

This event is cancelable.

This event does not have a result.

This event is fired on the

引用无效
NeoForge#EVENT_BUS
.
  • 字段详细资料

    • stat

      private Stat<?> stat
    • value

      private int value
  • 构造器详细资料

    • StatAwardEvent

      @Internal public StatAwardEvent(Player player, Stat<?> stat, int value)
  • 方法详细资料

    • getStat

      public Stat<?> getStat()
      返回 the Stat being awarded。
      返回:
      the Stat being awarded
    • setStat

      public void setStat(Stat<?> stat)
      Replaces the Stat to be awarded
    • getValue

      public int getValue()
      返回 the current value to be awarded to the Stat
      返回:
      the current value to be awarded to the Stat
    • setValue

      public void setValue(int value)
      Replaces the value to be awarded.