NPC Inventory menu?

Discussion in 'Plugin Development' started by TheBUGBadCheeseburger, Mar 17, 2014.

Thread Status:
Not open for further replies.
  1. I was wondering if it was possible to utilize the PlayerInteractEvent with NPCs and the InventoryMenus?

    I don't mean NPCs as in Villagers, But as in something implemented from RemoteEntities.

    (no spoodfeed please)
  2. Offline


    Are you asking if you can right click like a villager, and it would open up an inventory?
  3. Offline

    The Fancy Whale

    Player interact event then open a GUI perhaps?

    TheBUGBadCheeseburger Sorry I meant Player Interact Entity Event

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 7, 2016
  4. Offline


    Something like this?
    1. @EventHandler
    2. public void interactent(PlayerInteractEntityEvent e) {
    3. Player p =e.getPlayer();
    4. if (e.getRightClicked() instanceof NPC) {
    5. HumanEntity he = (HumanEntity) e.getRightClicked();
    6. if (he.getName() == "Datdenkikniet") {
    7. p.openInventory(p.getEnderChest());
    8. }
    9. }
    10. }

    If you mean this, read the citizen docs, learn their API.
  5. KingPsychopath I feel I'm a little more fluent with RemoteEntities API, Rather than Citizens.
  6. Offline


  7. KingPsychopath So basically NPC Shops has claimed copyright on that?
  8. Offline


    Nooo... If you haven't already realized, I meant that you can use it, read it but you can't edit it a bit and re-upload it as your own, read the license.
Thread Status:
Not open for further replies.

Share This Page