How can I bind a GUI with inventory to a player?

Started by CR1MS4NE on Thu, 07/08/2021 - 15:08

Topic category: Help with modding (Java Edition)

Last seen on 18:14, 19. Sep 2021
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How can I bind a GUI with inventory to a player?
Thu, 07/08/2021 - 15:08

I need a way to save the inventory of a GUI which is opened via keybind. There are a ton of items that can be obtained that all have a similar function, but they must be "equipped" to be used and I don't seem to be able to create a GUI that saves its contents and is bound to the player. Any ideas?

The only way I can think of…
Fri, 07/09/2021 - 08:09

The only way I can think of is to use player variables (itemstack type) to store inventory data and then on gui open and close triggers, load and save the data from slots to the player variables