Skript Gui, shift clicking?

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

    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!

LastMC

New Member
Jul 28, 2021
8
1
3
1697605626363.png

I have a multitude of skripted guis, i have tried to disabled each skript one at a time, i have tried to disable each plugin one at a time but it doesnt seem to solve the issue that i can shift click items into skript guis when i shouldnt be able to. i can shift click any item into any gui but i cant take it out. i have on index events to prevent the editing of guis but nothing seems to disable / prevent / stop people from just shift clicking items into skript guis. no errors come up in console or when reloading skript :/ if anyone has any suggestions on what to do i would really appreciate it.
 
Well it's kinda difficult to guess the issue if I can't see the actual code that's responsible for this behaviour. I would guess you messed up the indexing or didn't consider inventory types in the cancellation of inventory click event.
I really can't tell tho. I would need code
 
Well it's kinda difficult to guess the issue if I can't see the actual code that's responsible for this behaviour. I would guess you messed up the indexing or didn't consider inventory types in the cancellation of inventory click event.
I really can't tell tho. I would need code
i disabled every skript and created a new vanilla gui skript and it still did it

heres the skript i mad after disabling all the other ones:

command /gui:
trigger:
set metadata tag "gui1" of player to chest inventory with 3 rows named "&7test"
set slot 0 of metadata tag "gui1" of player to stone named "&7test"
open (metadata tag "gui1" of player) to player

on inventory click:
if event-inventory = (metadata tag "gui" of player):
cancel event
 
you are setting gui1 but cancelling gui...
I don’t understand skquery very well. But I believe he is trying to make it so when a player clicks a item it puts it back. I believe in skquery there is a thing that’s like
Set {gui} to be unstealable or smth like that. But in regular skript you would do this:
code_language.skript:
On inventory click:
  If name of event-inventory is “[name of gui]”:
    Cancel event
Please note this was not tested and if it contains any errors please reply. (I’m on my phone rn)
 
I don’t understand skquery very well. But I believe he is trying to make it so when a player clicks a item it puts it back. I believe in skquery there is a thing that’s like
Set {gui} to be unstealable or smth like that. But in regular skript you would do this:
code_language.skript:
On inventory click:
  If name of event-inventory is “[name of gui]”:
    Cancel event
Please note this was not tested and if it contains any errors please reply. (I’m on my phone rn)
replacing
if event-inventory = (metadata tag "gui" of player):
with
if name of player's current inventory is "&7test":
fixed everything, ty so much ive been stuck with this bug for god knows how long
 
replacing
if event-inventory = (metadata tag "gui" of player):
with
if name of player's current inventory is "&7test":
fixed everything, ty so much ive been stuck with this bug for god knows how long
Yeah, metadata tags suck.