Class AdvancementEvent.AdvancementEarnEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
AdvancementEvent

public static class AdvancementEvent.AdvancementEarnEvent extends PlayerEvent
Fired when the player earns an advancement. An advancement is earned once its requirements are complete.

Note that advancements may be hidden from the player or used in background mechanics, such as recipe advancements for unlocking recipes in the recipe book.

This event is not cancellable, and does not have a result.

This event is fired on the main Forge event bus, only on the logical server.

See Also:
  • Field Details

  • Constructor Details

    • AdvancementEarnEvent

      public AdvancementEarnEvent(Player player, Advancement earned)
  • Method Details

    • getAdvancement

      public Advancement getAdvancement()
      Returns the advancement that was earned.
      Returns:
      the advancement that was earned