You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to run some code when the player 'cancels' the renaming them selves?
I can't figure it out because the InventoryCloseEvent is always fired, no mater if the AnvilGUI did 'player.closeInventory()' or the if the player cancels it him/her self...
Thank you,
Siem
The text was updated successfully, but these errors were encountered:
Thanks for your response!
I need this because I have the AnvilGUI come up when placing a block(beacon) and the player is then prompted to give a name for it, but when they press esc I want to cancel the block from placing...
Then you shouldn't place the block if they close the inventory (InventoryCloseEvent). You should only place the block in the BiFunction of when the user inputs a value, rather than placing it before and removing on pressing the esc key.
Dear WesJD,
Is it possible to run some code when the player 'cancels' the renaming them selves?
I can't figure it out because the InventoryCloseEvent is always fired, no mater if the AnvilGUI did 'player.closeInventory()' or the if the player cancels it him/her self...
Thank you,
Siem
The text was updated successfully, but these errors were encountered: