Writing to config

Discussion in 'Plugin Development' started by Insprill, Oct 20, 2019.

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

    Insprill

    Ok so i'm trying to make a plugin where player can type '/cjm set firstjoinmessage <message>' and i need help with how to have it write what they type into that line in my config.yml. Just not sure exactly what to use to do it.
     
  2. Offline

    robertlit

    Oncommand -> if args match -> config.set(path, arg[2])
     
  3. Offline

    Insprill

    cant do just config.set(path, arg[2]). or well the config part
     
  4. Offline

    timtower Administrator Administrator Moderator

    getConfig().set then
    But that depends on the fact if the class is the main class or not.
     
  5. Offline

    Strahan

    Plus this is a variable argument issue, just setting args[2] will not be sufficient. I'd do (configuration object).set(path, StringUtils.join(args, " ", 2, args.length))
     
Thread Status:
Not open for further replies.

Share This Page