Commands in essentials

Discussion in 'Spigot Plugin Help' started by CrazyGaming56, May 2, 2017.

  1. Hello there,
    I hope you could be of assistance to me
    I need to know how to make commands run when a player does for example /kit diamond it runs a command
    I need to know how to do this as I am running a HCF server and need players to get lives with /lives add <player> <amount> and also it needs to announce in chat that the ranked people have claimed there kit!​
     
  2. If you couldn't tell i am using essentials kits
     
  3. I'm still confused on what you want, can you please try to explain better?
     
  4. Gianluca

    Gianluca Retired Resource Staff
    Retired Patron

    If you are using EssentialsX, I believe they have an option for commands in kits. Check their wiki on GitHub
     
  5. Executing commands with essentials kits is not possible. What is possible is using a Vouchers plugin like this https://www.spigotmc.org/resources/simple-vouchers.24010/ then you can recreate the item for the voucher in essentials kits so then when they do there kit they will be given the voucher to right click and then a command will be executed.
     
  6. @ItsLewizzz I don't want to use vouchers, I want it to be directly added to their account as if they claim they're kit someone may kick them from a faction and kill them or if the server got ETBed (if u know what that is) they may lose their voucher and won't get it back
     
  7. What is the link, if you wouldn't mind
     
  8. Oh, it seems you can do commands in kits with EssentialsX. I researched a bit and you should just put the command in there so like
    Code (Text):
    - /give {player} diamond 1
     
  9. Where do i put that
    And @Longey98 i already have a HCF core why are you telling me about them i have a custom one
     
    • Like Like x 1
  10. At where you list the items for the specific kit.
     
  11. I really don't understand why you're using Essentials Kits within a HCF server? Is it for donors, the lives feature should be in the core?
    If it's for donors use donor claim which I linked you to up there, you can make it run via console so like ./lives add <player> <amount> and also give them their donor kit via that plugin. It then saves the player into a data folder so they cannot reclaim till you reset it when the next map releases.
     
  12. First, the core I'm using doesn't have /reclaim otherwise i would use that secondly i know how to give them lives dumbass i want the command to run when they claim their kit
     
  13. Look, here is an example I made up for you to understand:

    Code (Text):
    TestKit:
        delay: 86400
        items:
          - 278 1 efficiency:50 durability:50 fortune:30 name:&c&lOP_&f&lPick
          - /give {player} diamond 1
    This would give the player a pickaxe and will execute a console command. Remember you need EssentialsX to do commands in kits.
     
    • Like Like x 1
  14. If that works thank you