I read on a different post that damaging the player would close the chat window. So could you not force something like that before you send the GUI packets?
Yep, I said that (in another thread I think), when the player gets damage, the chat windows closes. So you could damage the player to close the chat, give him/her the health back again and then send the chest-inventory when. But this is very, very hacky, I hope there is a better way
Yes but i need to know how to put items in a chest and doing a certain command when they item is being taken out. :/
I'd make one but there would be conflicts of InventoryTransactionEvent between pmmp and the gfork and I'd thus be forced to make two versions which would be a pain. I'll just make the pmmp version of this for now. If anyone wants to contribute, check my GitHub.
ChestShop A simple ChestGUI based Shop Plugin Chest shop allows you to create Chest GUI based shops - a widely used feature in minigames such as MoneyWars, SkyBlock and SkyWars. Features: Ability to add enchanted, custom named, custom NBT tagged items. Everything can be managed in-game on run time. No config modification needed. Two papers, named "Turn Left" and "Turn Right" are located at the end of the GUI to switch pages. ChestGUI (Block and inventory) is only sent to the command issuer. The GUI tile block is unbreakable, making it impossible for anyone to duplicate the chest contents. Usage of custom chest tiles and inventories rather than bulk events for performance. Commands: /cs - Opens the ChestShop. (Permission: Everyone) /cs add [price] - Add the item in your hand to the ChestShop. (Permission: OP) /cs remove [page] [slot] - Remove item from a specific page and slot. (Permission: OP) /cs reload - Reloads the plugin (use this if you experience issues). /cs help - List all commands with their descriptions. Thats it. There's one small error with unserialization of NBT tags. Basically, after you are done with /cs add [price], and you test-check the items by doing /cs, you will get "An unknown error occurred" message. To fix this, either restart the server or use /cs reload. View this on GitHub.
thread:CRITICAL > "無法處理事件 'pocketmine\event\inventory\InventoryTransactionEvent' 至 'ChestShop v1.0.0':Call to a member function getValue() on null 在 ChestShop\EventListener 上" thread:CRITICAL > Error: "Call to a member function getValue() on null" (EXCEPTION) in "/plugins/ChestShop/src/ChestShop/EventListener" at line 85
That's still their personal problem. Players on my server really love the GUI interactions. And my server is mostly based on GUIs.