Hey SkUnity people
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:
none
Addons using (including versions):
SkQuery, TuSKe, skRayFall,
Troubleshooting:
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
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:
none
Addons using (including versions):
SkQuery, TuSKe, skRayFall,
Troubleshooting:
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