Solved Creating and opening an inventory without showing the player's inventory?

Discussion in 'Spigot Plugin Development' started by Sulphate, Jun 25, 2018.

  1. Hello,

    As the title suggests, I am looking to be able to create and open an inventory without showing the player's inventory in the opened inventory.

    Any help appreciated!
    Sulphate
     
  2. There's no way to do this in the default game. The best you can do is open a hopper inventory, clear the player's inventory, use their inventory as the menu, and when they close the menu, reset their inventory contents.
     
    • Like Like x 1
  3. It is not possible to hide it but you can hide or change the contents of the players inventory while your custom inventory is open. Before opening the custom inventory, just save the players inventory somewhere and then clear it and in the InventoryCloseEvent, you take the backup you made and restore it again. That would hide the players inventory while in the custom inventory or it is also possible to have parts of a custom gui in the cleared player inventory slots.

    EDIT: I just remembered another idea from a video I saw a while back which uses resource packs for custom guis, it should be possible to use this to create an inventory texture which also removes the actual item slots. Check it out right here.
     
    • Like Like x 1
  4. Aww ok. Thanks anyway :)