Code: Select allDon't close the UI with the escape button
This should actually be intentional. some usages of the api may want the user to exit out of the screen.
For example, a plugin could open this gui in place of a chest and allow a player to select only the items they want and then to close the gui leaving the other drops for other players. Esc is a quick and easy way to close the drop menu and should be supported.
The better option here is to expand on the API and allow for the server to receive notice about the closer via another sub event, that way a plugin dev who doesn't want the player to be able to close the drop screen can simply reopen it forcing a player to chose an option.
Code: Select allthe client side implementation needs some work, if you want to use this as a new drop screen post battle you technically can't the client will get massive desync
That's a fault of opening any screen while the battle GUI is still open. and not a problem of the custom drops gui. Its a fault of the camera switching, all screens need to be delayed till after the battle gui has fully shutdown.
Code: Select allIt also partially looses the purpose of using the API in the first place
This is a stretch, it was not expressly created to literally replace the built in drops screen after battle, but to allow for grander usages. But none the less, we can add a switch into the battle drops screen to use the custom one instead and have all logic redirected to you.