Class Spawned

java.lang.Object
net.citizensnpcs.api.trait.Trait
net.citizensnpcs.api.trait.trait.Spawned
All Implemented Interfaces:
Runnable, Listener

public class Spawned extends Trait
Represents the spawn state of an NPC. This only determines whether an NPC should spawn onEnable. For checking if an NPC's entity is spawned, use NPC.isSpawned().
  • Constructor Details

    • Spawned

      public Spawned()
  • Method Details

    • setSpawned

      public void setSpawned(boolean shouldSpawn)
      Sets whether an NPC should spawn during server starts or reloads.
      Parameters:
      shouldSpawn - Whether an NPC should spawn
    • shouldSpawn

      public boolean shouldSpawn()
      Gets whether an NPC should spawn during server starts or reloads.
      Returns:
      Whether an NPC should spawn
    • toString

      public String toString()
      Overrides:
      toString in class Object