DELETE ITEM ON CLICK
iSkreqm opened this issue ยท 3 comments
Hi! I'm making a minecraft server and your plugin is so cool!
But, i've some problems,
first one: I create a compass to open a chestcommand menu, but, when I opne it the compass disapear..
Someone can help me?
items:
devine-item:
id: COMPASS
slot: 0
name: '&6&lMenu &7(Clic droit)'
commands:
multi-click:
- 'player: chestcommands open tp'
commands-type: interact,
commands-item: COMPASS
commands-cooldown: 1
itemflags: self-drops,
triggers: join, respawn, world-switch,
permission-node: itemjoin.tp
enabled-worlds: world,
So the item is automatically disabled in worlds you do not define under enabled-worlds. If you want it automagically removed you can add the auto-remove
itemflag to the item and the item will be automatically removed from worlds that are not listed under the enabled-worlds, AKA disabled worlds.
Example; itemflags: self-drops, auto-remove
Also, I notice you have commas after some of your lists, you should remove the commas at the end of each list as it "could" potentially cause conflicts as YAML is very sensitive.
Here is what I mean, compare this to your original;
items:
devine-item:
id: COMPASS
slot: 0
name: '&6&lMenu &7(Clic droit)'
commands:
multi-click:
- 'player: chestcommands open tp'
commands-type: interact
commands-item: COMPASS
commands-cooldown: 1
itemflags: self-drops, auto-remove
triggers: join, respawn, world-switch
permission-node: itemjoin.tp
enabled-worlds: world
Let me know how this works out for you.
EDIT: Marking as answered due to inactivity. Please reopen this issue if you need further help.