title: Bukkit - How to read from a YML file and use in an if statements
body: <p>I would like to read data from my config.yml. It's saving data like (playerName: value). I want to check, if player's name value is equals to 0, then ban him. But still don't know how to read those values. I was searching around spigot forum but nothing worked.</p>
  
  <pre><code>@EventHandler
      public void OnDeath(PlayerDeathEvent event) {
          Player player = event.getEntity().getPlayer();
          String playerName = player.getName();
  
          int lives;
  
          if (!livesMap.containsKey(player)) {
              // Set the default amount of lives to 2. (3 minus 1, since the player already died once)
              lives = 2;
  
              plugin.getConfig().set(playerName, lives);
              plugin.saveConfig();
          } else {
              // Subtract one from the player's lives
              lives = livesMap.get(player) - 1;
  
              // Saving playerName and lives
              plugin.getConfig().set(playerName, lives);
              plugin.saveConfig();
          }
  
          livesMap.put(player, lives);
  </code></pre>
  
  <p>My data is saving like this, but i want to know what method should i use to read values.</p>