title: Swtiching row statement in MySQL returns nothing
body: <p>I am currently writing a MySQL plugin and want to read out of my database every first row where the second row has a special value:</p>
  
  <pre><code>private String ip;
  
  public MySqlNPCData(String host, int port){
      this.ip = host + ":" + port;
  }
  
  public List&lt;UUID&gt; getUUIDs(){
      try {
          PreparedStatement ps = MySQL.getConnection().prepareStatement("SELECT UUID FROM npc_data WHERE IP = ?");
          ps.setString(1, ip);
          ResultSet rs = ps.executeQuery();
          ArrayList&lt;UUID&gt; IDs = new ArrayList&lt;&gt;();
          if(!rs.next()) {
              rs.close();
              return null;
          }
          while(rs.next()) {
              IDs.add(UUID.fromString(rs.getString("UUID")));
          }
          for(UUID s : IDs){
              System.out.println(s.toString());
          }
          return IDs;
      } catch (SQLException e) {
          e.printStackTrace();
      }
      return null;
  }
  
  public boolean contains(NPC npc){
      try {
          PreparedStatement ps = MySQL.getConnection().prepareStatement("SELECT IP FROM npc_data WHERE UUID = ?;");
          ps.setString(1, npc.UID.toString());
          ResultSet rs = ps.executeQuery();
          return rs.next();
      } catch (SQLException e) {
          e.printStackTrace();
      }
      return false;
  }
  
  @SuppressWarnings("static-access")
  public void save(NPC npc){
      if(!contains(npc)){
          try {
              PreparedStatement ps = MySQL.getConnection().prepareStatement("INSERT INTO npc_data (UUID,IP,WORLD,X,Y,Z,YAW,PITCH,SKIN_UUID) "
                      + "VALUES (?,?,?,?,?,?,?,?,?);");
              ps.setString(1, npc.UID.toString());
              ps.setString(2, ip);
              ps.setString(3, npc.getLocation().getWorld().getName());
              ps.setDouble(4, npc.getLocation().getX());
              ps.setDouble(5, npc.getLocation().getY());
              ps.setDouble(6, npc.getLocation().getZ());
              ps.setFloat(7, npc.getLocation().getYaw());
              ps.setFloat(8, npc.getLocation().getPitch());
              ps.setString(9, npc.uuid);
              ps.executeUpdate();
          } catch (SQLException e) {
              e.printStackTrace();
          }
      }else{
          try {
              PreparedStatement ps = MySQL.getConnection().prepareStatement("UPDATE npc_data SET IP = ?, WORLD = ?, "
                      + "X = ?, Y = ?, Z = ?, YAW = ?, PITCH = ?, SKIN_UUID = ? WHERE UUID = ?;");
              ps.setString(1, npc.UID.toString());
              ps.setString(2, ip);
              ps.setString(3, npc.getLocation().getWorld().getName());
              ps.setDouble(4, npc.getLocation().getX());
              ps.setDouble(5, npc.getLocation().getY());
              ps.setDouble(6, npc.getLocation().getZ());
              ps.setFloat(7, npc.getLocation().getYaw());
              ps.setFloat(8, npc.getLocation().getPitch());
              ps.setString(9, npc.uuid);
              ps.executeUpdate();
          } catch (SQLException e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately, it always returns nothing in the System output, can anybody please help me? Thank you very much</p>