Force players to run command even without permission, PLEASE HELP!

Discussion in 'Spigot Help' started by ItzBlaze, Jun 29, 2018.

  1. Hello! I am ItzBlaze and I currently am trying to get a crate plugin to give a kit to the player but it can't because you cannot do /kit (kitname) (player) you can only do /kit (kitname). So I currently need a way to FORCE a player to run a specific command even though they don't have a permission (one can not do /sudo because the person you sudo needs permission to the command you are trying to make the player use with /sudo)
     
  2. Try using the /execute (which is not recommended and I not even sure it works), or simply use the Essentials API to grab what items are in that kit and give them to the player manually.
     
  3. If OP goes with this route, here is how to hook in

    Code (Java):
    Essentials essentials = (Essentials) Bukkit.getServer().getPluginManager().getPlugin("Essentials");
    ArrayList<String> kit = (ArrayList) essentials.getKits().getKit("<kit name>").get("items");
    That will an ArrayList of the items in String form, which you will then have to serialize.
     
  4. Chest Commands and CMI plugins allow Players to run commands as "Op". Those are the only 2 I have ever used.
     
  5. if u use a gui do op: kit name