Yamakaja / commanditems

Assign commands to items
https://www.spigotmc.org/resources/command-items.42556/
MIT License
8 stars 15 forks source link

This item isn't working? #18

Closed ArvickC closed 4 years ago

ArvickC commented 4 years ago

CommonPick: item: type: CHEST name: "&7&lRandom Stone Tool" lore: ["&6Right Click&b to claim tool!"] glow: true consumed: true cooldown: 1 actions:

Yamakaja commented 4 years ago

Could you please provide me with an error message or some indication as to what has gone wrong?

In the meantime, try if this works:

CommonPick:
  item:
  type: CHEST
  name: "&7&lRandom Stone Tool"
  lore: ["&6Right Click&b to claim tool!"]
  glow: true
  consumed: true
  cooldown: 1
  actions:
   - { action: COMMAND, by: CONSOLE, command: 'give {player} stone_pickaxe\{Enchantments:[\{id:efficiency,lvl:3},\{id:unbreaking,lvl:1}]} 1' }
   - { action: MESSAGE, to: PLAYER, message: '&6You got:&a&l Common&7 Stone&a Pickaxe!' }
ArvickC commented 4 years ago

Error without the change you pasted: https://hastebin.com/alexaziqoy.apache

Error with the change you pasted: image

Yamakaja commented 4 years ago

Ahh yes, the indentation is wrong - how about this:

CommonPick:
  item:
    type: CHEST
    name: "&7&lRandom Stone Tool"
    lore: ["&6Right Click&b to claim tool!"]
    glow: true
  consumed: true
  cooldown: 1
  actions:
   - { action: COMMAND, by: CONSOLE, command: 'give {player} stone_pickaxe\{Enchantments:[\{id:efficiency,lvl:3},\{id:unbreaking,lvl:1}]} 1' }
   - { action: MESSAGE, to: PLAYER, message: '&6You got:&a&l Common&7 Stone&a Pickaxe!' }