Villager inventory troubles

Discussion in 'Plugin Development' started by pie_flavor, Feb 5, 2015.

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

    pie_flavor

    One plugin I have always wanted to make is a player trading plugin that works in the villager trading window. It'd be simple: You right click someone, it opens a MerchantInventory. You put an item in slot 1. They see a notification that requires them to click you before they can respond. They put their item in slot 1. Other complicated things happen.
    Problem is this: How can I dynamically set the items in the trade slots (not the inventory slots)? I need the player to see the change in the trade instantly, but I can't even figure out how to set the item in the trade. Any help would be appreciated.
     
  2. Offline

    Darkpicasa

    player.updateInventory();
     
  3. Offline

    pie_flavor

    @Darkpicasa Did you even read the post? That has absolutely nothing to do with what I was asking.
     
    Skionz likes this.
  4. Offline

    Skionz

    @pie_flavor Isn't there a packet sent when opening an inventory?
     
  5. Offline

    pie_flavor

    @Skionz Dunno, never worked with NMS before. Also, I'd love a way to keep the things set dynamically, and be able to change them as the trade gets changed.
     
  6. Offline

    Skionz

Thread Status:
Not open for further replies.

Share This Page