Solved Config problem

Discussion in 'Plugin Development' started by HyrulesLegend, Nov 15, 2013.

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

    HyrulesLegend

    I've been working for awhile now, and basically what I'm trying to do is on an event, (Player Interact) it gets line(1) of a sign, and then it puts whatever sign.getLine(1) is in the config. Any ideas? (The event is working, the setting the sign.getLine(1) in config is not working.)
     
  2. Offline

    Jake6177

    this.getConfig().getString("stringpath");
     
  3. Offline

    HyrulesLegend

    I don't believe you understand what I'm trying to do. Once I get the config, I want to create a new String in the config based on whatever Line 1 on the sign is.
     
  4. Offline

    Jake6177

    this.getConfig().set("path", value);
     
  5. Offline

    xTrollxDudex

    Max_The_Link_Fan
    PHP:
    public void createNewPath(String pathObject... o) {
        
    getConfig().createSection(path);
        
    saveConfig();
        
    reloadConfig();

        if(
    != null && Arrays.asList(o).length == 1) {
            
    getConfig().set(patho);
            
    saveConfig();
        }
    }
     
  6. Offline

    Jake6177

    Why multiple objects accepted if you're only testing for 1? (or am I an idiot :3)
     
  7. Offline

    xTrollxDudex

    Jake6177
    It gives to option to not have that parameter :)
     
Thread Status:
Not open for further replies.

Share This Page