Solved Convert InventoryView to Inventory

Discussion in 'Plugin Development' started by bsomerville, Jul 22, 2016.

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

    bsomerville

    Pretty simple question: I am using Player#getOpenInventory() to get the inventory that the player currently has open, though that method returns an InventoryView, not an Inventory. On the docs for InventoryView, there are two methods that return an inventory: getTopInventory() and getBottomInventory(). The description is also quite vague.
    Question(s): What do these methods do, and which one should I use?
     
  2. If the player opens a chest, there is a top inventory (chest) and a bottom one (player)
     
  3. Offline

    Zombie_Striker

    @bsomerville
    An open inventory contains two inventories: The player's inventory and the actual inventory. The bottom inventory is the player;s inventory, while the Top is for the other inventory.
     
  4. Offline

    bsomerville

    Thanks for explaining!
     
Thread Status:
Not open for further replies.

Share This Page