GUI Open/Close (Section) — skript-gui

Addon: skript-gui · Category: Section · Since: 1.0.0, 1.3.0 (open section)

Syntax

run (when|while) (open[ing]|clos(e|ing)) [[the] gui]

Description

Enables running code when a player opens or closes their GUI.

Examples

create a gui with virtual chest inventory with 3 rows named "My GUI":
	run when the gui opens:
		send "You just opened this GUI!" to player
	run on close:
		send "You just closed this GUI!" to player

View source