NPC Shop Help

Discussion in 'Plugin Development' started by TehVoyager, Feb 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TehVoyager

    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.
     
    Last edited by a moderator: Jun 6, 2016
  2. Offline

    xTrollxDudex

  3. Offline

    random_username

    TehVoyager
    As xTrollxDudex said, you can you Citizens. You can check if an entity is an NPC like this:
    Code:java
    1. 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.
     
  4. Offline

    TehVoyager

    Thank You, I have accomplished everything I need to using Citizens.
     
Thread Status:
Not open for further replies.

Share This Page