Opening an inventory window - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Opening an inventory window (/thread-3190.html) |
Opening an inventory window - MGlolenstine - 08-01-2018 Hello, I'm trying to build a GUI for a lobby plugin I'm making, so I'd like to know if there's a way to open the pre-loaded inventory to a specific player? I've looked into the cPlayer class, but I didn't see such a method. Thanks in advance RE: Opening an inventory window - NiLSPACE - 08-01-2018 Hi, You'll have to use the cPlayer:GetInventory method. Using that you'll get a cInventory object which you can use to manipulate the inventory of the player. RE: Opening an inventory window - MGlolenstine - 08-01-2018 (08-01-2018, 04:38 PM)NiLSPACE Wrote: Hi, Sorry, I might've misformatted the question and I'm sorry for that, I was tired, but ok, let me rephrase. I wanted to ask if there was a way to open a virtual chest inventory, that a player could use for "menu navigation". And now, with clear head, I'm presenting the answer: Code: Player:OpenWindow() How could I've been so blind... Thanks anyways and godspeed! |