#Inventory cancel event dont work

1 messages · Page 1 of 1 (latest)

wanton pebble
small oracle
#

oh you are using option too in function

wanton pebble
small oracle
#

weird

small oracle
small oracle
wanton pebble
small oracle
#
  broadcast name of event-inventory
olive tangle
#

im pretty sure if you put an empty color into inventory name with no text for it to color it just gets discarded

#

i know you used to be able to do it

#

but some update changed it

small oracle
#

then try removing &r

olive tangle
#

should use metadata to check if some inventory is open

wanton pebble
wanton pebble
#

now when I close that inventory, I can't manipulate with my player inventory too

olive tangle
#

as said above
when you open home gui give person some tag

wanton pebble
olive tangle
#

and check for that tag when cancelling click events

#

you can remove the tag on inventory close

small oracle
wanton pebble
#

Now when I manipulate with my own player inventory, it cancel it

small oracle
#
In open event
  set metadata value "home" of player to true
In cancel event
  if metadata value "home" of player is true
In close event
  clear metadata value "home" of player
wanton pebble
#

Like this?:

#

because it dont work

#

now I can manipulate with that inventory

olive tangle
#

You want to wait 1 tick before deleting the tag

small oracle
#

try if player has metadata value "home":

#

well that's same right?

#

I don't use metatags much

#

@olive tangle can help you better

olive tangle
#

Meh

wanton pebble
#

nope, I tryed it

#

but I think it is some bug

#

it is without any error, but it dont work

#

I everytime used if name of event-inventory is "home": cancel event

#

but now it cancel event in my player inventory too

wanton pebble
#

Someone know how to do it please?

keen storm
#

why don’t you set a variable

sharp linden
#

Set the metadata tag to the home gui, open the metadata to the player. on inventory click, check if event-inventory is the metadata tag

cinder cave
sharp linden
#

that just checks if the metadata tag is set, not if the inventory is that

#

iirc, even if you delete the metadata tag, it just sets it to false and doesn't actually delete it until the server restarts

wanton pebble
#

Thank you all