I run a zombie apocalypse server and part of the map is a "safe zone". In the safe zone I want there to be npc characters that sell stuff like guns. I can do most of is stuff but even after looking at quite a few threads and at the Citizens source code I cant find out how to spawn a npc and detect a right click. I just want to know how to spawn and detect an interact on a npc. Btw I've really never used packets before but I believe I'll need to for this. Thanks. Bump, I would be willing to use an API EDIT by Moderator: merged posts, please use the edit button instead of double posting.
TehVoyager As xTrollxDudex said, you can you Citizens. You can check if an entity is an NPC like this: Code:java boolean isCitizensNPC = entity.hasMetadata("NPC"); Edit: Or you could use the NPCRightClickEvent (From the Citizens API), which is called when you right click an NPC.