GUI
This module allows you to quickly create interactive GUIs in a couple of lines of code Special thanks to the
APickledWalrus for creating an addon
skript-gui . Part of the code and the idea was borrowed from him.
This module allows you to quickly create interactive GUIs in a couple of lines of code Special thanks to the
APickledWalrus for creating an addon
skript-gui . Part of the code and the idea was borrowed from him.
Creates a new GUI and puts it in the result of the expression last created GUI
create [a] [new] gui with %inventory% [(and|with) ([re]move[e]able|stealable) items] [(and|with) shape %strings%]
The last argument allows you to use prepared templates for the arrangement of interactive elements. For example, if we open the funnel inventory, we can specify the template “xxixx”, and then, when creating the element “x”, the first, second, fourth and fifth slots will be with this element.
Allows you to redefine interactive elements inside an already created GUI
(change|edit) [gui] %gui%
When you click on this element, the code inside the section will be executed. The expression below creates an interactive element on the next empty inventory slot.
(make|format) [the] next gui [slot] (with|to) [([re]mov[e]able|stealable)] %itemtype%
The following expression allows you to specify the value from the template or the slot number to create the element.
(make|format) gui [slot[s]] %strings/numbers% (with|to) [([re]mov[e]able|stealable)] %itemtype%
(un(make|format)|remove) [the] next gui [slot]
(un(make|format)|remove) gui [slot[s]] %strings/numbers%
(un(make|format)|remove) all [[of] the] gui [slots]
The code inside this section will be executed after opening the GUI to the player.
run (when|while) open[ing] [[the] gui]
run (when|while) [the] gui opens
run on gui open[ing]
The code inside this section will be executed after the GUI is closed by the player.
run (when|while) clos(e|ing) [[the] gui]
run (when|while) [the] gui closes
run on gui clos(e|ing)
Returns the last GUI created/modified
[the] last[ly] [(created|edited)] gui
Returns the currently open GUI of the player
%players%'s gui
gui of %player%'s
%players% (has|have) a gui [open]
%players% do[es](n't| not) have a gui [open]
Returns the number or letter of the template of the next GUI slot
%guis%'[s] next gui slot[s]
[the] next gui slot[s] of %guis%
Subsequent expressions can only be used in the GUI creation sections and creating an interactive element
[the] next gui slot
%gui%'s gui(-| )name
gui(-| )name of %gui%
%gui%'s gui(-| )size
gui(-| )size of %gui%
%gui%'s gui(-| )shape
gui(-| )shape of %gui%
%gui%'s gui(-| )lock(-| )status
gui(-| )lock(-| )status of %gui%
[the] gui
[the] gui(-| )raw(-| )slot
[the] gui(-| )hotbar(-| )slot
[the] gui(-| )inventory
For example, a player made a double click, which caused things to gather in the cursor slot.
[the] gui(-| )inventory(-| )action
For example, a player made a click with the Shift key held down.
[the] gui(-| )click(-| )(type|action)
[the] gui(-| )cursor[(-| )item]
[the] gui(-| )slot(-| )type
[the] gui[(-| )(clicked|current)](-| )item
[the] gui(-| )player
Be sure to use this expression inside the GUI or interactive element creation section instead of player, otherwise your code will not work as you expect it to.
[the] gui(-| )(viewer|player)s
[the] gui(-| )slot(-| )id
Subsequent expressions can only be used in the closing GUI section
Prohibits the player from closing the GUI by reopening it while preserving the GUI parameters
cancel [the] gui clos(e|ing)
Allows the player to close the GUI
uncancel [the] gui close(e|ing)