Class ProgressResearchObjectiveEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.research.event.ProgressResearchObjectiveEvent
Direct Known Subclasses:
ProgressResearchObjectiveEvent.Post, ProgressResearchObjectiveEvent.Pre

public abstract class ProgressResearchObjectiveEvent extends net.neoforged.bus.api.Event
An event that is fired when a player progresses an objective in a PlayerResearchStage.
This event is fired on the Pixelmon.EVENT_BUS.
This event does not relate to when the player gets the rewards for completing the objective as they have to manually claim the rewards through the user interface.
For events relating to the rewards, see ClaimResearchObjectiveEvent and ClaimResearchStageEvent.
  • Field Details

  • Constructor Details

  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
    • getResearch

      public PlayerResearch getResearch()
    • getStage

      public PlayerResearchStage getStage()
    • getObjective

      public PlayerResearchObjective getObjective()
    • getEvent

      public net.minecraft.core.Holder<InteractionEvent> getEvent()
    • getContext

      public StoredContext getContext()
    • willComplete

      public boolean willComplete()
      This method is used to determine if the objective will be completed after the event is fired.
      This is useful for determining if the player will be able to claim the rewards for the objective.
      Note this may not give accurate results if called from the ProgressResearchObjectiveEvent.Post event.
      Returns:
      true if the objective will be completed after the event is fired, false otherwise