Skript Version: 2.1.2 (Apparently the latest stable version). I was also using SkQuery.
Minecraft Version: The server is running Spigot 1.8.8. When I tested it, I was on 1.12 (I was able to join because of ViaVersion).
I'm trying to make a GUI appear after a command and change to another GUI after clicking an item in it. I managed to make the first GUI with the item and set it so that clicking the item closes the GUI and opens the second GUI. However, when I tried it, clicking the item only closed the first GUI. I tried out my command for the second GUI to make sure it's working and it seems to work fine. I originally thought Skript couldn't close and open GUIs at the same time so I added delays but it still didn't work. There are no errors on reload. Here is my code:
Help would be greatly appreciated!
Minecraft Version: The server is running Spigot 1.8.8. When I tested it, I was on 1.12 (I was able to join because of ViaVersion).
I'm trying to make a GUI appear after a command and change to another GUI after clicking an item in it. I managed to make the first GUI with the item and set it so that clicking the item closes the GUI and opens the second GUI. However, when I tried it, clicking the item only closed the first GUI. I tried out my command for the second GUI to make sure it's working and it seems to work fine. I originally thought Skript couldn't close and open GUIs at the same time so I added delays but it still didn't work. There are no errors on reload. Here is my code:
Code:
options:
sellgun: slot 11 of player with gold ingot named "&6&lSell Guns" with lore "&7Click to sell guns" to close then run "gunsell"
ammoshop: slot 13 of player with rose red named "&4&lAmmo Shop" with lore "&7Click to buy/sell ammo" to close then run "shopammo"
buygun: slot 15 of player with iron ingot named "&3&lBuy Guns" with lore "&7Click to buy guns" to close then run "gunbuy"
back: slot 45 of player with arrow named "&a&lBack" with lore "&7Click to go back" to close then run "gunstore"
command /gunstore:
permission: skript.gunstore
trigger:
wait 5 tick
open chest with 3 rows named "&2&lGun Store" to player
wait 2 tick
format {@sellgun}
format {@ammoshop}
format {@buygun}
command /gunsell:
permission: skript.gunsell
trigger:
wait 5 tick
open chest with 6 rows named "&6&lSell Guns" to player
wait 2 tick
format {@back}
Help would be greatly appreciated!
Last edited: