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

Started by SirPogsalot on

Topic category: Help with modding (Java Edition)

Last seen on 04:15, 27. Mar 2024
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I bind a GUI with inventory to a player?

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