Solved Items from GUI showing in chest

  • 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!


    You can always check out our Wiki for downloads and any other information about Skript!

Not open for further replies.


Feb 9, 2020
Hey SkUnity people :emoji_grinning: i made a skript when you rightclick an emerald a GUI opens up
and the problem is when i rightclick it works fine but when i hold the emerald in my hand and rightclick on a chest, hopper, enderchest etc the items from the gui appear in there and than you can simply duplicate them how can i fix this?

Skript Version:
Skript 2.2
Minecraft Version: 1.8.8
Full Code:
on rightclick holding emerald:

loop all items in the inventory of player:

if loop-item's name is "§8➥ &c----":

set {remove-item.%player%} to loop-item

set {item-back.%player%} to "true"

open chest with 3 rows named "&7&l------§a§lTauschbörse&7&l------" to player

wait 1 tick

format slot 0 of player with 1 black glass named "§8§m---" to be unstealable

format slot 1 of player with 1 black glass named "§8§m---" to be unstealable

Not 100% full code dont want to show it .-.

Errors on Reload:


Addons using (including versions):
SkQuery, TuSKe, skRayFall,


Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
[doublepost=1581440925,1581289576][/doublepost]Just a quick replay i got help on the discord just needet to add cancel event 1 line before i open a virtual chest :emoji_slight_smile:
add "if event-block is chest or hopper or enderchest:" after the event, to just stop, and a "else" section to continue the skript
some recommendations:
1. use list variables
2. use BOOLEANS instead of STRINGS, so not "true", but just true, it takes much less space to save a boolean than a string in your memory
3. use vanilla guis, what you are using is skquery guis which are not recommended, they are buggy, slow and lack features. tutorial:
Not open for further replies.