How to put a Crate Key in a Kit?

Discussion in 'Bukkit Help' started by luigiferari, Jul 29, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    luigiferari

    I have CrateReloaded and Essentials as a plugin. How to put a crate key in a kit?

    My CrateReloaded crate config.yml:

    VotingKey:
    type: KEYCRATE
    preview:
    enabled: true
    buy:
    enabled: false
    cost: 0
    message:
    onOpen: ''
    broadcast: '%prefix%%player% has opened an Voting Crate and recieved...'
    key:
    item: '131'
    enchantment: 34:10
    name: '%white%Voting %gold%Key!'
    lore:
    - '%gray%Go to the nearest Voting Key Crate to open it and recieve a reward!'
    effect:
    onOpenEffects: 'firework'
    dormantEffects: ''
    reward:
    minimumRewards: 1
    maximumRewards: 1
    rewards:
    - 'cmd:(/give %player% glowstone 16), chance:(5), broadcast:(%prefix%16 Glowstone!), display:(glowstone 16 %green%glowstone %chance%)'
    - 'cmd:(/give %player% emerald_block 1), chance:(1), broadcast:(%prefix%Emerald Block!), display:(emerald_block 1 emerald_block %chance%)'
    - 'cmd:(/give %player% gold_block 1), chance:(2), broadcast:(%prefix%Gold Block!), display:(gold_block 1 gold_block %chance%)'
    - 'cmd:(/give %player% iron_block 2), chance:(3), broadcast:(%prefix%Iron Block!), display:(iron_block 2 iron_block %chance%)'
    - 'cmd:(/give %player% lapis_block 2), chance:(4), broadcast:(%prefix%Lapis Block!), display:(lapis_block 2 lapis_block %chance%)'
    - 'cmd:(/give %player% obsidian 32), chance:(5), broadcast:(%prefix%Obsidian!), display:(obsidian 32 obsidian %chance%)'
    - 'cmd:(/give %player% eye_of_ender 1), chance:(1), broadcast:(%prefix%Eye ofEnder!), display:(eye_of_ender 1 eye_of_ender %chance%)'
    - 'cmd:(/give %player% ender_pearl 3), chance:(2), broadcast:(%prefix%Ender Pearl!), display:(ender_pearl 3 ender_pearl %chance%)'
    - 'cmd:(/give %player% 331 64), chance:(5), broadcast:(%prefix%Redstone!), display:(331 64 redstone_dust %chance%)'
    - 'cmd:(/give %player% 165 3), chance:(15), broadcast:(%prefix%Slimeblocks!), display:(165 3 slimeblocks %chance%)'
    - 'cmd:(/give %player% mossy_cobblestone 64), chance:(7), broadcast:(%prefix%Mossy Cobblestone!), display:(48 64 mossy_cobblestone %chance%)'
    - 'cmd:(/give %player% log 16), chance:(10), broadcast:(%prefix%Wood!), display:(17 16 log %chance%)'
    - 'cmd:(/give %player% 4 64), chance:(50), broadcast:(%prefix%Cobblestone!), display:(4 64 cobblestone %chance%)'
    - 'cmd:(/give %player% 12 32), chance:(5), broadcast:(%prefix%Sand!), display:(12 32 sand %chance%)'
    - 'cmd:(/give %player% 98 64), chance:(5), broadcast:(%prefix%Stonebricks!), display:(98 64 stonebricks %chance%)'
    - 'cmd:(/give %player% 329 1), chance:(50), broadcast:(%prefix%Saddle!), display:(329 1 saddle %chance%)'
    - 'cmd:(/give %player% 417 1), chance:(10), broadcast:(%prefix%Iron Horse Armor!), display:(417 1 iron_horse_armor %chance%)'
    - 'cmd:(/give %player% 418 1), chance:(5), broadcast:(%prefix%Gold Horse Armor!), display:(418 1 gold_horse_armor %chance%)'
    - 'cmd:(/give %player% 435 16), chance:(15), broadcast:(%prefix%Beetroot!), display:(435 16 Beetroot %chance%)'

    Can someone pls help me, I need to put a voting key in a kit and it doesn't work :/
     
  2. Offline

    luigiferari

    keys:
    delay: 604800
    items:
    - 131 3 name:&fVoting_&6Key! lore:&7Go_to_the_nearest_Voting_Key_Crate_to_open_it_and_receive_a_reward!

    here you go :)
     
  3. @luigiferari
    Next time, post your config in [code][/code] tags, or using a pastebin. Even the smilies in your post seem to agree with me.
     
  4. Offline

    luigiferari

    okay :)
     
  5. @luigiferari You don't add the enchant it is likely that is causing the issue.
     
  6. Offline

    luigiferari

    keys:
    delay: 604800
    items:
    - 131 3 durability:10 name:&fVoting_&6Key! lore:&7Go_to_the_nearest_Voting_Key_Crate_to_open_it_and_receive_a_reward!

    still doesn't work and I have even put unsafe-enchantments to true :/

    I have tried it, but still.. If i give myself a crate key via command and if I use the key, they are both identical but the 1 from the kit doesn't work on the Voting Crate itself :/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 29, 2016
  7. @luigiferari You could always use CommandOverride or DynamicAlises to make the kit command run the essentials kit and run the command to give the key
     
  8. Offline

    techy569

    you can try using essentialskitmanager it helps a bit
     
  9. Offline

    luigiferari

    Okay ty i'll try it when my server is back up (host has problems :/)
     
  10. Offline

    luigiferari


    @bwfcwalshy I have installed DynamicAliases, how can I like put the playername? because I wont know it. If I put a command like: /crate givekey {playername} VotingKey 3? Is it correct or do i need to change to {player} or something else?

    And how can I put a cooldown on it?

    So it looks like this now:

    SquireKeys:
    description: 3 Voting Keys per week!
    usage: /kit squirekeys, your own usage
    permission: squirekeys.use
    permission-message: No permission!
    commands:
    - crate givekey {player} VotingKey 3
    messages:
    - This is a list of messages
    - 'You received 3 voting keys!'
     
  11. @luigiferari Seems @timtower doesn't have a player placeholder but he does have {args} which can be used to get the player name just use your command and the player name eg /command bwfcwalshy
     
  12. Offline

    luigiferari

    But I would like that people can do it themselves, like a /kit with cooldown on it so they get weekly extra voting keys. I rlly don't know how to do that :/
     
Thread Status:
Not open for further replies.

Share This Page