Solved [YAML] Checking to see if a section exist.

Discussion in 'Plugin Development' started by Deleted user, Feb 15, 2013.

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

    Deleted user

    Well I thought this would work however it always says the section existed even if it didn't.

    Code:
     
    if ((f.getConfigurationSection("arenas." + arenaName) == null)) {
    player.sendMessage(SSSettings.getInstance().title + ChatColor.GRAY + "Could not find an arena by the name of " + arenaName + ".");
    return;
    }
    
     
  2. Offline

    gomeow

    if(getConfig().getConfigurationSection("section.section").getKeys(false).contains("gomeow"))
     
Thread Status:
Not open for further replies.

Share This Page