walknthedark Posted July 16, 2022 Share Posted July 16, 2022 (edited) Hi, I've been trying for some time to write code that detects the moment I open the GUI to a player, but I can't manage it. After a long search, I came across a class called "GuiScreen", but I can't use it - it just doesn't exist. In general, I would like to know how to OPEN a GUI in the form of a chest (player's inventory). This would help me in further work. Thanks in advance. Edited July 17, 2022 by walknthedark Link to comment Share on other sites More sharing options...
Luis_ST Posted July 16, 2022 Share Posted July 16, 2022 you can use ScreenOpenEvent Link to comment Share on other sites More sharing options...
walknthedark Posted July 16, 2022 Author Share Posted July 16, 2022 3 hours ago, Luis_ST said: you can use ScreenOpenEvent could you explain in more detail how I can use it? Link to comment Share on other sites More sharing options...
warjort Posted July 16, 2022 Share Posted July 16, 2022 Look at how ChestBlock.use() uses getMenuProvider() Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post. Link to comment Share on other sites More sharing options...
Luis_ST Posted July 16, 2022 Share Posted July 16, 2022 1 hour ago, walknthedark said: could you explain in more detail how I can use it? are you talking about a client side Screen or a server side Menu? Link to comment Share on other sites More sharing options...
walknthedark Posted July 17, 2022 Author Share Posted July 17, 2022 On 7/16/2022 at 6:30 PM, Luis_ST said: are you talking about a client side Screen or a server side Menu? The server I play on periodically displays a chest in which you have to choose the right item (a kind of Anti-AFK). I need to detect if he has opened the chest for me, and then select the item based on the name of the chest. Link to comment Share on other sites More sharing options...
Recommended Posts