WolvSk Format Anvil GUI

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Jun 15, 2018
14
0
0
29
code_language.skript:
command /uninviti:
    trigger:
        open an anvil gui named "Name2" to player with default text "USERNAME TO UNTRUST" and with item light blue stained glass
        
 
on close anvil gui named "Name2":
    set {_INPUT2} to event-text
    wait 1 tick
    execute player command "/plot remove %{_INPUT2}% untrust"

I was wondering how I would go about formatting the middle slot of this anvil GUI as a green glass pain that is named Submit and when clicked closes the Anvil GUI to run the "on close anvil gui" code. (Credit to: ShaneBee for this code).
 
That sets the slot, but I couldn't find a way to close the inventory.. (to close, close the inventory of player, close anvil gui, etc.)

code_language.skript:
command /uninviti:
    trigger:
        open an anvil gui named "Name2" to player with default text "USERNAME TO UNTRUST"
        format slot 1 of player with green stained glass named "Submit" to close
 
on close anvil gui named "Name2":
    set {_INPUT2} to event-text
    wait 1 tick
    execute player command "/plot remove %{_INPUT2}% untrust"
 
Status
Not open for further replies.