I'm making this one row nine slots chest that you can access with a command. The only problem is, I cannot figure out how to save it... Actually, I don't know when to save it. Is there something I could use, like maybe a condition to check if the virtual chest gets closed? Any help would be good
HeadGam3z what @zombiekiller753said is true but you can have a public static inventory object in your class and access that, this inventory holds the items initial even when not used by anyone. And you can save its contents on disable (not sure if it is serialisable)