Class NpcDespawned

java.lang.Object
net.storm.api.events.NpcDespawned

public class NpcDespawned extends Object
An event fired when an NPC despawns from the game world.

This event is triggered when an NPC is removed from the visible game world. This can occur when an NPC dies, when the player moves away from the NPC's location, during scene transitions, or when an NPC is otherwise removed from the game state.

See Also:
  • Constructor Details

    • NpcDespawned

      public NpcDespawned()
  • Method Details

    • getActor

      public IActor getActor()
      Gets the despawned NPC as a generic actor.

      This is a convenience method for code that works with actors generically rather than specifically with NPCs.

      Returns:
      the NPC as an IActor