#Change the item on a slot by clicking on it

1 messages · Page 1 of 1 (latest)

shrewd iris
#

Hello, is it possible to change an item on a slot by clicking on it? For example I click on the green dye and it will change to a grey_dye

Would be great if someone could help me, because I can't find something about this in the wiki.

Bye,
White

carmine scaffold
shrewd iris
# carmine scaffold Yes you can, set the view_requirment to the green dye with a permission for ex p...

Im stuck, its really complicated. Can you maybe help me? This is what I got now:

`'flags_fly_true':
displayname: '&8&l➜ Plot Fly &aAktivieren'
material: GREEN_DYE
slot: 10

view_requirement:
requirements:
flags_fly_true:
type: has permission
permission: fly_true
click_commands:

  • [console] 'lp user %player_name% permission set fly_false'
  • [console] 'lp user %player_name% permission remove fly_true'

'flags_fly_false':
displayname: '&8&l➜ Plot Fly &cDeaktivieren'
material: GREY_DYE
slot: 10

view_requirement:
requirements:
flags_fly_false:
type: has permission
permission: fly_false
click_commands:

  • [console] 'lp user %player_name% permission set fly_true'
  • [console] 'lp user %player_name% permission remove fly_false'`
#

Maybe I should work with [givepermission] instead of using luckperms and the console😅

#

Nvm, doesnt helped me either yet

shrewd iris
#

@carmine scaffold ?

carmine scaffold
shrewd iris
carmine scaffold
#

what's wrong with this menu?

#

is doesn't work?

carmine scaffold
shrewd iris
carmine scaffold
#

give urself one of the perms

#

the menu doesn't open cuz there aren't any items that u can see

shrewd iris
#

But the menu doesnt load

carmine scaffold
#

wdym doesn't load?

#

u can't open it? xd

shrewd iris
shrewd iris
carmine scaffold
#

send me the menu

#

whole menu

#

I fixed all the errors u had

#

try it

shrewd iris
carmine scaffold
#

kk

#

so, does it work?

shrewd iris
carmine scaffold
#

o-0

carmine scaffold
shrewd iris
#

Ahh, sry

#

I overlooked the menu

#

My bad

#

Now the menu loaded, but the item doesnt work. I got the grey_dye but after clicking on it, I only got the perm but nothing else was changed

shrewd iris
carmine scaffold
#

Add - '[refresh]' if u don't want close

shrewd iris
modern dagger
shrewd iris
modern dagger
#

first of all, luckperms has a feature that can't let run many commands at a time, it could be a part of a problem, try making a delay for one of commands so one will execute after another with a small delay and then add refresh, or just simply make it easier: just remove default permission (false one) cos it's not really needed, you just want to check for true one

#

just set the false button to parse player like this:

type: !has permission permission: fly_true