Skip to content

GUI Properties

Patrick Miller edited this page Jul 17, 2026 · 4 revisions

Name

The name of a GUI is the title that was provided during its creation. It can be set, cleared, or reset. You can simply use Skript's 'name' expression to obtain this:

the name of the gui

Note

If you create a GUI using syntax not provided by skript-gui, this value may not be available or accurate.

Size

The size of a GUI is the number of slots it has. It can be set or reset. You can simply use Skript's 'size' expression to obtain this:

the size of the gui

Layout

skript-gui supports defining custom layouts for your GUI that makes defining many slots at once a breeze. The layout of a GUI can be specified during its creation:

create a gui with virtual chest inventory with 3 rows named "Layout GUI" and layout "xxxxxxxxx", "x-------x", and "xxxxxxxxx"

The important part of the syntax here is and layout, with the full pattern being: [(and|with) (layout|shape) %-texts%]. This goes at the end of the create a gui statement.

The layout of a GUI is comprised of texts, where each text represents a row in the inventory, and each character in the text represents a slot. By assigning the same character to multiple slots, those slots will share the same items and behavior when formatted.

So, we can format a specific part of the layout by specifying its identifying character as the slot:

create a gui with virtual chest inventory with 3 rows named "Layout GUI" and layout "xxxxxxxxx", "x-------x", and "xxxxxxxxx":
	make gui slot "x" with gold ingot named "<gold>Treasure"
	open last gui to player

In-game, we can view the result:

image

Layout Expression

The layout of a GUI can also be obtained or change using the gui layout expression:

[gui] (layout|shape)[s] of %guis%
%guis%'[s] [gui] (layout|shape)[s]

For example, we could edit the GUI to invert the shape when the treasure is clicked:

create a gui with virtual chest inventory with 3 rows named "Layout GUI" and layout "xxxxxxxxx", "x-------x", and "xxxxxxxxx":
	make gui slot "x" with gold ingot named "<gold>Treasure":
		set the gui's layout to "---------", "-xxxxxxx-", and "---------"
	open last gui to player

Lock Status (Stealable Items)

Caution

Coming Soon

Clone this wiki locally