Solved Save string to config

Discussion in 'Plugin Development' started by TGamingStudio, Sep 21, 2017.

Thread Status:
Not open for further replies.
  1. Hello Please how to save strign to config ?
    i know load string from config....
    Code:
    public void onEnable()
        {
            getLogger().info("Plugin By TomasGaminStudio - PL Enabled ");
            getConfig().options().copyDefaults(true);
            saveConfig();
            Prefix = getConfig().getString("Prefix");
        }
    Please when i do /prefix <arg1> i want to change prefix .. it works but after restart it comes back to Config format... how to save from game to config ? :D
     
  2. Offline

    timtower Administrator Administrator Moderator

    TGamingStudio likes this.
  3. @timtower what i have to change from path and value ?
    path = string name
    value = value of string ?


    ------------------------------
    huh i guess right :D it works .. Thanks @timtower
     
    Last edited: Sep 21, 2017
  4. Offline

    timtower Administrator Administrator Moderator

    @TGamingStudio path = where to store.
    value = whatever you want to store.
     
  5. @timtower yes thank you i guess right ... String name where tho store and the string to store :)
     
  6. Offline

    yPedx

  7. @yPedx than you too ... rhere are much helfull thigs ;) [diamond][diamond][diamond][diamond]
     
Thread Status:
Not open for further replies.

Share This Page