Skip to main content
Retrieve information about a specific NPC in your instance using its ID or UUID. This endpoint returns details about the NPC including its name and association with the instance. Use this endpoint to track and manage your NPCs, ensuring they are properly registered and maintained in your game world.
// Retrieve an NPC using its UUID
UUID npcUuid = UUID.fromString("your-npc-uuid");
NPC npc = PixocracySDK.NPCManager().retrieve(instance, npcUuid);

// Access NPC properties
String name = npc.getName();
UUID uuid = npc.getUuid();