Page 1 of 1

on_player_opened_changed

Posted: Thu Apr 27, 2017 10:39 pm
by Earendel
Being able to change the opened state for a player is a big step forwards.

What would be great is if there was an event fired when the player opened state changes, either by opening or closing an interface.

Not only would this be useful in a number or normal situations, but it would also finally allow people to set up their own on-click GUI for custom entities by detecting the entity being opened and then immediately closing the entity in order to show their custom GUI.

Re: on_player_opened_changed

Posted: Sat Oct 07, 2017 1:30 am
by Rseding91
I've added on_gui_opened and on_gui_closed events for 0.16. The closed event has a few special cases to it in that it won't fire if the thing opened is closed as a result of it being destroyed - it's only fired when the player or mod explicitly closes the GUI.

Re: on_player_opened_changed

Posted: Sat Oct 07, 2017 5:19 am
by eradicator
One tick handler less. Awesome :mrgreen: