#refresh a gui

1 messages · Page 1 of 1 (latest)

feral forum
#

Hello, I am trying to make a battlepass how could i refresh a gui like:

on inventory click:
  if name of event-inventory is "&e&lBattlePass":
    if index of event-slot = 10:
      cancel event
      set slot 10 of {battlepassgui} to light green stained glass named "&aClaimed!" with lore "&aYou have already claimed this item"
      # refresh the gui

I could use close player's inventory but it will have loads of code and i dont want to be copy and pasting for over an hour
is there another way like refresh {battlepassgui}

indigo root
#

Open battalepassgui to player

lofty furnace
#

Also, just a quick heads up, your {battlepassgui} variable is global, so there's only one that all players interact with, instead of a player-by-player system. Did you intend this?

feral forum
#

oh k

feral forum
#

X8ight

#

if i set slot 10 of event-inventory

#

will it be permneant

#

so when i repoen inv it will stay as light green stained glass

echo dove
#

No?

feral forum
#

i need it to be permneant

#

so when i repoen the inv it still has slot 10 as green stained glass named claimed

#

otherwise they can claim as many times as they want

verbal cedar
#

when you open the gui, check if a player has a true variable or a permission set

#

also to refresh the gui you could just reopen it