Custom Command from config

Discussion in 'Plugin Development' started by StefanXX, Apr 10, 2014.

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

    StefanXX

    Hey, im trying to make custom commands that people choose from the config this is what i did:
    if(commandLabel.equalsIgnoreCase(getConfig().getString("YourCommand")))
    but it seems to be wrong, and i added in the plugin.yml the command as YourCommand
    anyone have any ideas on how i can finish this?
     
  2. Offline

    Ravada

    Is this a command argument or an actual command?
     
  3. Offline

    StefanXX

    I want it to be a variable and i dont know how to make a variable as command :p because of plugin.yml...
     
  4. Offline

    BillyBobJoe168

    You could have a string list of commands you want and then make them arguments. Then it would just be if (args[0].equalsIgnoreCase(getConfig().getStringList("YourCommand"))) { }
     
  5. Offline

    StefanXX

  6. Offline

    Sgt_Tailor

    did you register it?
     
  7. Offline

    StefanXX

    I will code a bit later i need to do some stuff on the server etc.. but i know where to find the code if i need. :)
     
Thread Status:
Not open for further replies.

Share This Page