Class NPCTracker
java.lang.Object
com.pixelmonmod.pixelmon.api.entity.npc.NPCTracker
This is used for storing important data about NPCs that exist
in the world and were placed by an admin.
It is important to note that not **all** NPCs are stored here. Only the ones that were placed by an admin, or specifically added to the storage by a sidemod, plugin, or Pixelmon itself.
It is a proxy for the actual storage and can be changed using the
It is important to note that not **all** NPCs are stored here. Only the ones that were placed by an admin, or specifically added to the storage by a sidemod, plugin, or Pixelmon itself.
It is a proxy for the actual storage and can be changed using the
setNPCStorage(EntityStorage)
method.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds an NPC to the storagestatic StoredEntity<NPC>
Finds the NPC storage for the given UUIDstatic List<StoredEntity<NPC>>
getAll()
Gets all the NPCs that are being trackedstatic EntityStorage<NPC>
Gets the storage for the NPCsstatic void
load()
Loads the NPCs from the storagestatic void
Removes an NPC from the storagestatic void
save()
Saves the NPCs to the storagestatic void
setNPCStorage
(EntityStorage<NPC> storage) Sets the storage for the NPCs
-
Constructor Details
-
NPCTracker
public NPCTracker()
-
-
Method Details
-
getNPCStorage
Gets the storage for the NPCs- Returns:
- The storage method
-
setNPCStorage
Sets the storage for the NPCs- Parameters:
storage
- The storage method
-
load
public static void load()Loads the NPCs from the storage -
save
public static void save()Saves the NPCs to the storage -
add
Adds an NPC to the storage- Parameters:
npc
- The NPC to add
-
remove
Removes an NPC from the storage- Parameters:
npc
- The NPC to remove
-
find
Finds the NPC storage for the given UUID- Parameters:
uuid
- The UUID of the NPC- Returns:
- The NPC storage
-
getAll
Gets all the NPCs that are being tracked- Returns:
- The NPCs
-