Class NPCEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.npc.NPCEvent
Direct Known Subclasses:
NPCEvent.EndBattle, NPCEvent.Interact, NPCEvent.StartBattle

public abstract class NPCEvent extends net.minecraftforge.eventbus.api.Event
Collection of events fired relating to interactions with Pixelmon NPCs.

Subclasses: NPCEvent.Interact, NPCEvent.StartBattle, NPCEvent.EndBattle

Created by Waterdude
Since:
March 12, 2021
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Event fired when a player versus NPC battle ends.
    static class 
    Event fired when an NPC is interacted with, before any logic is executed.
    static class 
    Event fired when a player attempts to start a battle versus an NPC.

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The NPC being interacted with.
    net.minecraft.world.entity.player.Player
    The player performing the interaction.
    What type of NPC this is for.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    NPCEvent(NPCEntity npc, EnumNPCType type, net.minecraft.world.entity.player.Player player)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • npc

      public NPCEntity npc
      The NPC being interacted with.
    • type

      public EnumNPCType type
      What type of NPC this is for.
    • player

      public net.minecraft.world.entity.player.Player player
      The player performing the interaction.
  • Constructor Details

    • NPCEvent

      protected NPCEvent()
    • NPCEvent

      protected NPCEvent(NPCEntity npc, EnumNPCType type, net.minecraft.world.entity.player.Player player)