I know, that already was discussed in https://forums.pocketmine.net/threads/opening-inventory.8955/page-2, but is there a different/better way to do it? The problem with the current code is you have to place a chest at 0 0 0, remove it and then restart the server. And you have to be in the chunk of 0 0 0 for it to work. Any ideas? And can you set the name of the chest? So that it shows up like on pc version when you rename a chest and open it? (Not "chest" standing on top but the chests name)
i think, the best way is send some packets to player. first i save player coordinates and send BlockUpdatePacket with chest block (this works), then i send BlockEntityPacket with the same coordinates and then send ContainerOpenPacket with these coordinates. and onClose i remove block maybe i'll make some API for this.
im recommending to make your own inventory class and fakeHolder class, and sendPackets in onOpen() and onClose() method
Then its exactly the same like i currently have Also all that are no real fake inventories. They are "fake tiles" but directly send to the client. I wanted to open a window and handle everything inside the plugin. Transferring items etc